* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #F5F0FF 0%, #FAF5FF 50%, #F0F5FF 100%);
    color: #2D1B4E;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-theme {
    background: linear-gradient(135deg, #0F0A1F 0%, #1A0F2E 50%, #130B2E 100%);
    color: #E9D5FF;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    padding: 24px 0;
    border-bottom: 1px solid rgba(157, 78, 221, 0.1);
}

body.dark-theme .header {
    border-bottom-color: rgba(199, 125, 255, 0.2);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo svg {
    display: block;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: #2D1B4E;
    line-height: 1;
}

body.dark-theme .logo-text {
    color: #E9D5FF;
}

.subdomain {
    font-size: 14px;
    color: #666;
    font-family: 'Courier New', monospace;
    background: rgba(157, 78, 221, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(157, 78, 221, 0.2);
}

body.dark-theme .subdomain {
    color: #C7B8E0;
    background: rgba(199, 125, 255, 0.15);
    border-color: rgba(199, 125, 255, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.error-section {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.error-icon {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    background: linear-gradient(135deg, #C77DFF 0%, #9D4EDD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.error-title {
    font-size: 36px;
    font-weight: 600;
    color: #2D1B4E;
    margin-bottom: 16px;
}

body.dark-theme .error-title {
    color: #E9D5FF;
}

.error-description {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 48px;
}

body.dark-theme .error-description {
    color: #C7B8E0;
}

/* Error Details */
.error-details {
    background: rgba(157, 78, 221, 0.05);
    border: 1px solid rgba(157, 78, 221, 0.15);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 48px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

body.dark-theme .error-details {
    background: rgba(199, 125, 255, 0.08);
    border-color: rgba(199, 125, 255, 0.25);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9D4EDD;
}

body.dark-theme .detail-label {
    color: #C77DFF;
}

.detail-value {
    font-size: 16px;
    font-family: 'Courier New', monospace;
    color: #2D1B4E;
    word-break: break-all;
}

body.dark-theme .detail-value {
    color: #E9D5FF;
}

/* Error Actions */
.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 64px;
}

.btn-primary, .btn-secondary {
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #C77DFF 0%, #9D4EDD 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(157, 78, 221, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(157, 78, 221, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #9D4EDD;
    border: 2px solid #9D4EDD;
}

body.dark-theme .btn-secondary {
    color: #C77DFF;
    border-color: #C77DFF;
}

.btn-secondary:hover {
    background: rgba(157, 78, 221, 0.1);
    transform: translateY(-2px);
}

body.dark-theme .btn-secondary:hover {
    background: rgba(199, 125, 255, 0.15);
}

/* Network Info */
.network-info {
    background: rgba(157, 78, 221, 0.05);
    border: 1px solid rgba(157, 78, 221, 0.15);
    border-radius: 16px;
    padding: 32px;
}

body.dark-theme .network-info {
    background: rgba(199, 125, 255, 0.08);
    border-color: rgba(199, 125, 255, 0.25);
}

.network-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #2D1B4E;
}

body.dark-theme .network-info h3 {
    color: #E9D5FF;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

body.dark-theme .status-item {
    background: rgba(199, 125, 255, 0.05);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.online {
    background: #10B981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.status-indicator.online::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #10B981;
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.status-item span {
    font-size: 14px;
    color: #2D1B4E;
}

body.dark-theme .status-item span {
    color: #E9D5FF;
}

/* Footer */
.footer {
    padding: 24px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

body.dark-theme .footer {
    color: #C7B8E0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 16px;
    }

    .error-code {
        font-size: 80px;
    }

    .error-title {
        font-size: 28px;
    }

    .error-description {
        font-size: 16px;
    }

    .error-details {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 16px;
    }

    .error-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 32px 16px;
    }

    .error-code {
        font-size: 64px;
    }

    .error-title {
        font-size: 24px;
    }

    .error-description {
        font-size: 14px;
        margin-bottom: 32px;
    }

    .error-details {
        padding: 20px;
    }

    .detail-value {
        font-size: 14px;
    }

    .network-info {
        padding: 24px;
    }

    .network-info h3 {
        font-size: 18px;
    }

    .subdomain {
        font-size: 12px;
    }
}
