/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    padding: 2rem;
    background-attachment: fixed;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    max-height: 80px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 0.8s ease;
}

/* Input Section */
.input-section {
    text-align: center;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    animation: fadeInUp 0.8s ease;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.input-row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.date-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.date-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.date-input label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-align: left;
}

input[type="text"] {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    min-width: 400px;
    transition: all 0.3s ease;
}

input[type="date"] {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    min-width: 180px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
    transform: translateY(-2px);
}

button {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

button:active {
    transform: translateY(0);
}

.sample-keys {
    margin-top: 1rem;
    opacity: 0.9;
}

.sample-keys code {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
}

.stat-value.success-text {
    color: #4CAF50;
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.stat-value.not-found-text {
    color: #FFC107;  /* Amber/yellow color */
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
}

.stat-value.failed-text {
    color: #f44336;
    text-shadow: 0 0 20px rgba(244, 67, 54, 0.5);
}

.api-key-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    text-align: center;
}

.api-key-section h3 {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.export-card {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.export-button {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px 0 rgba(31, 38, 135, 0.2);
}

.export-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(31, 38, 135, 0.4);
}

.export-button:active {
    transform: translateY(0);
}

/* Routes Section */
.routes-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.routes-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.route-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.route-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.route-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.route-stats {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.route-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.route-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error {
    background: rgba(244, 67, 54, 0.2);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 1rem;
    border: 1px solid rgba(244, 67, 54, 0.5);
    animation: shake 0.5s ease;
}

/* Results Section */
.results-section {
    display: none;
}

.results-section.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Activity Section */
.activity-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    margin-top: 2rem;
}

.activity-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tips-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    margin-top: 2rem;
}

.tips-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.mule-breakdown {
    margin-top: 1rem;
    padding-left: 1.5rem;
    border-left: 3px solid rgba(255, 255, 255, 0.2);
}

.mule-item {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.mule-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.mule-stats {
    opacity: 0.8;
}

.mule-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
    display: flex;
}

.mule-bar-non-jito {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.8s ease;
}

.mule-bar-jito {
    height: 100%;
    background: linear-gradient(90deg, #ee7b08ff, #fcd190ff);
    transition: width 0.8s ease;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    input {
        width: 100%;
        max-width: 400px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}