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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: rgba(30, 40, 96, 1);
    min-height: 100vh;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.header {
    background: #1e2860;
    color: white;
    padding: 20px 25px;
    text-align: center;
    border-radius: 12px 12px 0 0;
    position: relative;
    z-index: 1;
}

.header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
}

.error-content {
    padding: 25px 25px 20px;
    text-align: center;
}

.error-code {
    font-size: 5.5rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1;
}

.error-message {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 12px;
    font-weight: 500;
}

.error-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.error-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.error-details h3 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #dee2e6;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.detail-value {
    font-family: monospace;
    font-size: 0.85rem;
    color: #666;
    padding: 3px 6px;
    border-radius: 4px;
}

.status-badge {
    background: #dc3545;
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
}

.maintenance-section {
    background: linear-gradient(135deg, #f0f8ff 0%, #e0f2fe 100%);
    border: 2px solid #29b6f6;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
}

.maintenance-info h3 {
    color: #0277bd;
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: left;
    text-align: left;
}

.maintenance-info p, strong {
    color: #01579b;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: left;
}

.maintenance-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.maintenance-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #81d4fa;
}

.maintenance-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.maintenance-content {
    flex: 1;
}

.maintenance-content strong {
    color: #0277bd;
    display: block;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.maintenance-content p {
    color: #01579b;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.status-badge.maintenance {
    background: #29b6f6;
    color: white;
    animation: pulse-blue 2s infinite;
}

.what-happening-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #29b6f6;
    text-align: left;
}

.what-happening-section h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1rem;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    line-height: 1.5;
    text-align: left;
}

.activity-item strong {
    color: #2d3748;
}

.expectation-section {
    margin: 25px 0;
}

.expectation-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1rem;
    text-align: center;
}

.expectations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.expectation-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease;
    border-left: 4px solid #29b6f6;
}

.expectation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.expectation-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.expectation-card h4 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1rem;
}

.expectation-card p {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.maintenance-notice {
    background: #fff9c4;
    border: 2px solid #fbbf24;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
}

.maintenance-notice h4 {
    color: #92400e;
    margin-bottom: 10px;
    font-size: 1rem;
}

.maintenance-notice p {
    color: #451a03;
    line-height: 1.5;
    margin: 0;
    font-size: 0.9rem;
}

.retry-section {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: flex-end;
}

.retry-section p {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

.retry-btn, .report-btn {
    background: #1e2860;
    color: white;
    border: 2px solid #1e2860;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
    box-sizing: border-box;
    width: 160px;
    text-align: center;
}

.retry-btn:hover, .report-btn:hover {
    background: #1e4060;
    transform: translateY(-1px);
}

.report-btn {
    background: transparent;
    color: #1e2860;
}

.report-btn:hover {
    background: #1e2860;
    color: white;
    transform: translateY(-1px);
}

.challenge-section {
    background: #f0f8ff;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    text-align: left;
}

.status-badge.challenge {
    background: #2196f3;
    color: white;
    animation: pulse 2s infinite;
}

.waf-section {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 2px solid #fc8181;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
}

.security-info h3 {
    color: #c53030;
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    text-align: left;
}

.security-info h3::before {
    content: "🛡️";
    margin-right: 8px;
    font-size: 1.2rem;
    text-align: left;
}

.security-info p {
    color: #742a2a;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: left;
}

.block-reason h4 {
    color: #c53030;
    margin-bottom: 10px;
    font-size: 1rem;
    text-align: left;
}

.block-reason ul {
    margin: 0;
    padding-left: 20px;
    color: #742a2a;
    text-align: left;
}

.block-reason li {
    margin-bottom: 8px;
    line-height: 1.4;
    text-align: left;
}

.status-badge.blocked {
    background: #e53e3e;
    color: white;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.resolution-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #4299e1;
}

.resolution-section h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1rem;
    text-align: left;
}

.resolution-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.resolution-item {
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    line-height: 1.5;
}

.resolution-item strong {
    color: #2d3748;
}

.action-section {
    margin: 25px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.appeal-btn {
    background: transparent;
    color: #e53e3e;
    border: 2px solid #e53e3e;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
    box-sizing: border-box;
    width: 160px;
    text-align: center;
}

.appeal-btn:hover {
    background: #e53e3e;
    color: white;
    transform: translateY(-1px);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.help-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.help-section h3 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1rem;
}

.help-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.help-section li {
    color: #666;
    margin-bottom: 5px;
    line-height: 1.4;
}

.help-section p {
    color: #7c2d12;
    margin-bottom: 20px;
    line-height: 1.5;
}

.help-btn {
    background: #ed8936;
    color: white;
    border: 2px solid #ed8936;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.help-btn:hover {
    background: #dd6b20;
    border-color: #dd6b20;
    transform: translateY(-1px);
}

.contact-section {
    text-align: center;
    margin: 20px 0;
}

.contact-section p {
    color: #666;
    margin-bottom: 15px;
}

.contact-btn {
    background: transparent;
    color: #1e2860;
    border: 2px solid #1e2860;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.contact-btn:hover {
    background: #1e2860;
    color: white;
    transform: translateY(-1px);
}

.geo-section {
    background: linear-gradient(135deg, #fff8dc 0%, #ffeaa7 100%);
    border: 2px solid #fdcb6e;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
}

.restriction-details {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.status-badge.geo-blocked {
    background: #e67e22;
    color: white;
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.reasons-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #17a2b8;
    text-align: left;
}

.reasons-section h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1rem;
}

.solutions-section {
    margin: 25px 0;
}

.solutions-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1rem;
    text-align: center;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.solution-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.solution-card {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.solution-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.solution-card.wait {
    border-left: 4px solid #38a169;
}

.solution-card.slow {
    border-left: 4px solid #3182ce;
}

.solution-card.check {
    border-left: 4px solid #d69e2e;
}

.solution-card.contact {
    border-left: 4px solid #e53e3e;
}

.solution-card h4 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1rem;
}

.solution-card p {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.geo-challenge-section {
    background: linear-gradient(135deg, #e8f4fd 0%, #b3d9ff 100%);
    border: 2px solid #4a90e2;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
}

.challenge-info h3 {
    color: #2c5aa0;
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.challenge-info p {
    color: #1a365d;
    margin-bottom: 20px;
    line-height: 1.5;
}

.location-display {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0 20px 0;
}

.location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #cbd5e0;
}

.location-item:last-child {
    border-bottom: none;
}

.location-label {
    font-weight: 600;
    color: #2c5aa0;
    font-size: 0.9rem;
}

.location-value {
    font-family: monospace;
    font-size: 0.9rem;
    color: #2d3748;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.location-info h3 {
    color: #b8860b;
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    text-align: left;
}

.location-info p {
    color: #8b6914;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: left;
}

.cf-container {
    background: rgba(255, 255, 255, 0.9);
    border: 2px dashed #4a90e2;
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
}

.cf-container h4 {
    color: #2c5aa0;
    margin-bottom: 15px;
    font-size: 1rem;
}

.status-badge.geo-challenge {
    background: #4a90e2;
    color: white;
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.why-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #4a90e2;
    text-align: left;
}

.why-section h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1rem;
}

.reasons-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reason-item {
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    line-height: 1.5;
    text-align: left;
}

.reason-item strong {
    color: #2d3748;
}

.rate-limit-section {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe0b3 100%);
    border: 2px solid #ff9500;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
}

.limit-info h3 {
    color: #cc7a00;
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    text-align: left;
}

.limit-info p {
    color: #994d00;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: left;
}

.rate-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.rate-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ffcc80;
}

.rate-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.rate-content {
    flex: 1;
}

.rate-content strong {
    color: #cc7a00;
    display: block;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.rate-content p {
    color: #994d00;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    text-align: left;
}

.status-badge.rate-limited {
    background: #ff9500;
    color: white;
    animation: pulse-orange 2s infinite;
    text-align: left;
}

@keyframes pulse-orange {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.causes-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #ff9500;
    text-align: left;
}

.causes-section h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1rem;
}

.causes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cause-item {
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    line-height: 1.5;
    text-align: left;
}

.cause-item strong {
    color: #2d3748;
}

.wait-time {
    background: rgba(56, 161, 105, 0.1);
    border-radius: 4px;
    padding: 8px;
    margin-top: 10px;
}

.wait-time strong {
    color: #2f855a;
    font-size: 0.85rem;
}

.retry-section {
    margin: 25px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.support-btn {
    background: transparent;
    color: #e53e3e;
    border: 2px solid #e53e3e;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    width: 160px;
    transition: all 0.2s ease;
    display: inline-block;
    font-family: inherit;
}

.support-btn:hover {
    background: #e53e3e;
    color: white;
    transform: translateY(-1px);
}

#countdown {
    font-weight: 600;
    color: #ff9500;
    background: rgba(255, 149, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.footer {
    background: #f8f9fa;
    padding: 15px 25px;
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #dee2e6;
    font-size: 0.85rem;
    color: #666;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.footer-right {
    text-align: right;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-label {
    font-weight: 600;
}

.footer-value {
    font-family: monospace;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.cf-error-details {
    margin: 15px 0;
}

/* Responsive Design */
@media (max-width: 800px) {
    body {
        padding: 10px;
    }

    .error-container {
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .header {
        padding: 15px 20px;
    }

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

    .error-content {
        padding: 20px;
    }

    .error-code {
        font-size: 3.5rem;
    }

    .error-message {
        font-size: 1.1rem;
    }

    .challenge-section {
        padding: 20px 15px;
        margin: 20px 0;
    }

    .waf-section {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .resolution-section {
        padding: 15px;
    }
    
    .action-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-section .retry-btn,
    .action-section .appeal-btn {
        width: 200px;
    }
    
    .resolution-options {
        gap: 10px;
    }
    
    .resolution-item {
        padding: 10px;
    }
    
    .help-section {
        padding: 15px;
    }

    .geo-section {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .restriction-details {
        padding: 12px;
    }
    
    .location-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .solutions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .solution-card {
        padding: 15px;
    }
    
    .contact-section {
        padding: 20px 15px;
    }
    
    .reasons-section {
        padding: 15px;
    }
    
    .reason-item {
        padding: 10px;
    }

    .rate-limit-section {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .rate-details {
        gap: 12px;
    }
    
    .rate-item {
        padding: 12px;
        gap: 12px;
    }

    .retry-section .retry-btn,
    .retry-section .auto-retry-btn,
    .retry-section .support-btn {
        width: 200px;
    }
    
    .causes-section {
        padding: 15px;
    }
    
    .cause-item {
        padding: 10px;
    }

    .footer {
        padding: 12px 20px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-right {
        text-align: center;
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
}

/* Full HD optimization */
@media (min-height: 1080px) {
    .error-code {
        font-size: 6rem;
        margin-bottom: 15px;
    }
    
    .error-content {
        padding: 30px 25px 25px;
    }
    
    .error-description {
        margin-bottom: 30px;
    }
    
    .retry-section {
        margin: 25px 0;
    }
}

/* Compact mode for shorter screens */
@media (max-height: 800px) {
    .header {
        padding: 15px 25px;
    }
    
    .error-content {
        padding: 20px 25px 15px;
    }
    
    .error-code {
        font-size: 4.5rem;
        margin-bottom: 8px;
    }
    
    .error-message {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .error-description {
        margin-bottom: 20px;
        font-size: 0.9rem;
    }
    
    .error-details {
        margin: 15px 0;
        padding: 12px;
    }
    
    .retry-section {
        margin: 15px 0;
    }

    .waf-section {
        padding: 20px;
        margin: 15px 0;
    }
    
    .resolution-section {
        padding: 15px;
        margin: 15px 0;
    }

    .geo-section {
        padding: 20px;
        margin: 15px 0;
    }
    
    .contact-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .reasons-section {
        padding: 15px;
        margin: 15px 0;
    }

    .rate-limit-section {
        padding: 20px;
        margin: 15px 0;
    }

    .solution-section {
        margin: 20px 0;
    }
    
    .solutions-grid {
        gap: 10px;
    }
    
    .solution-card {
        padding: 15px;
    }
    
    .retry-section {
        margin: 20px 0;
    }
    
    .causes-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .action-section {
        margin: 20px 0;
    }
    
    .footer {
        padding: 12px 25px;
    }
}

.loading-dot {
    display: inline-block;
    animation: loading 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading {
    0%, 80%, 100% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
}
