/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0b1e 0%, #1a1b3a 100%);
    color: #e2e8f0;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.header h1 i {
    color: #667eea;
    margin-right: 0.5rem;
}

.header p {
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 400;
}

.demo-notice {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Card styles */
.card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 800px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 70px -12px rgba(0, 0, 0, 0.6);
}

/* Loading state */
.loading-card {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.loading-card p {
    color: #94a3b8;
    font-size: 1.1rem;
}

/* Error state */
.error-card {
    text-align: center;
    padding: 4rem 2rem;
}

.error-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-card h3 {
    color: #ef4444;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-card p {
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.retry-button {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

/* Validator card */
.validator-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.validator-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.validator-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.validator-icon i {
    z-index: 1;
}

.validator-title {
    flex: 1;
    min-width: 200px;
}

.validator-title h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.address {
    font-family: 'Monaco', 'Menlo', monospace;
    color: #94a3b8;
    font-size: 0.9rem;
    word-break: break-all;
}

.status-badge {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge i {
    font-size: 0.6rem;
}

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

.stat-item {
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(51, 65, 85, 0.7);
    transform: translateY(-2px);
}

.stat-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.stat-content {
    flex: 1;
}

.stat-content label {
    display: block;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #e2e8f0;
}

/* Additional information */
.additional-info {
    margin-bottom: 2rem;
}

.additional-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-container {
    background: rgba(51, 65, 85, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.data-row:last-child {
    border-bottom: none;
}

.data-row label {
    color: #94a3b8;
    font-weight: 500;
    flex: 1;
}

.data-row span {
    color: #e2e8f0;
    font-weight: 500;
    text-align: right;
    flex: 1;
    word-break: break-all;
}

/* Staking CTA section */
.staking-cta-section {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    text-align: center;
}

.staking-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    margin-bottom: 1rem;
}

.staking-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.staking-cta-button:active {
    transform: translateY(-1px);
}

.cta-description {
    color: #94a3b8;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

/* Raw data section */
.raw-data-section {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    padding-top: 2rem;
}

.toggle-button {
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    justify-content: center;
}

.toggle-button:hover {
    background: rgba(51, 65, 85, 0.7);
    border-color: rgba(148, 163, 184, 0.3);
}

.raw-data {
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    padding: 1rem;
    overflow: auto;
}

.raw-data pre {
    color: #94a3b8;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.footer p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .card {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .validator-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .validator-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .validator-logo {
        border-radius: 12px;
    }

    .validator-title h2 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .data-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .data-row span {
        text-align: left;
    }
    
    .staking-cta-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .staking-cta-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 1rem;
    }

    .loading-card,
    .error-card {
        padding: 3rem 1rem;
    }

    .loading-spinner,
    .error-icon {
        font-size: 2rem;
    }
}

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

.card {
    animation: fadeIn 0.6s ease;
}

/* Custom scrollbar */
.raw-data::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.raw-data::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.raw-data::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

.raw-data::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}
