/* Go Red Robot Mail Tester - Stylesheet */

:root {
    --primary-red: #DC2626;
    --primary-red-dark: #B91C1C;
    --primary-red-light: #EF4444;
    --dark-bg: #0F0F0F;
    --darker-bg: #0A0A0A;
    --card-bg: #1A1A1A;
    --card-border: #2A2A2A;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #666666;
    --success: #22C55E;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    --glow-color: rgba(220, 38, 38, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: var(--darker-bg);
    border-bottom: 1px solid var(--card-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo strong {
    color: var(--primary-red);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.glow-effect {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Test Card */
.test-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.test-instruction {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.test-instruction p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.email-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--darker-bg);
    border: 2px solid var(--primary-red);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 32px;
}

.test-email {
    flex: 1;
    font-size: 1.1rem;
    font-family: 'Monaco', 'Menlo', monospace;
    color: var(--primary-red-light);
    word-break: break-all;
}

.copy-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.copy-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-bottom: 16px;
}

.btn-primary:hover {
    background: var(--primary-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* Results Section */
.results-section {
    padding: 60px 0;
}

.results-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.score-display {
    text-align: center;
    margin-bottom: 48px;
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 4px solid var(--primary-red);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 0 40px var(--glow-color);
}

.score-circle.good {
    border-color: var(--success);
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.3);
}

.score-circle.warning {
    border-color: var(--warning);
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
}

.score-circle.bad {
    border-color: var(--error);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.3);
}

#score-value {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

.score-max {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.score-message {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s;
}

.result-card:hover {
    transform: translateY(-2px);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.result-icon {
    font-size: 1.5rem;
}

.result-header h3 {
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
}

/* Info Button */
.info-btn {
    background: transparent;
    border: 2px solid var(--warning);
    color: var(--warning);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 14px;
    font-family: Georgia, serif;
    line-height: 1;
    padding: 0;
}

.info-btn:hover {
    background: var(--warning);
    color: var(--dark-bg);
}

.info-btn.error {
    border-color: var(--error);
    color: var(--error);
}

.info-btn.error:hover {
    background: var(--error);
    color: white;
}

.result-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.result-status.pass {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.result-status.fail {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.result-status.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.result-status.pending {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.result-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Email Details */
.email-details {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.email-details h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--card-border);
}

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

.detail-label {
    width: 120px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-value {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
    word-break: break-all;
}

/* How It Works */
.how-it-works {
    padding: 48px 0;
    background: var(--darker-bg);
}

.how-it-works h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 28px;
}

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

.step-card {
    text-align: center;
    padding: 20px;
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.step-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 48px;
}

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

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
}

.faq-item h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--primary-red-light);
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--card-border);
    padding: 60px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 12px;
    font-size: 0.9rem;
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-red-light);
}

.footer-bottom {
    border-top: 1px solid var(--card-border);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--card-border);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--card-border);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-body h4 {
    font-size: 0.95rem;
    color: var(--primary-red-light);
    margin-bottom: 12px;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.modal-body code {
    display: block;
    background: var(--darker-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    color: var(--primary-red-light);
    margin-bottom: 16px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.modal-body ul {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-left: 20px;
    margin-bottom: 16px;
}

.modal-body li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .test-card {
        padding: 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .header .container {
        flex-direction: column;
        gap: 16px;
    }

    .nav {
        gap: 20px;
    }

    .hero {
        padding: 48px 0 40px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .email-display {
        flex-direction: column;
        text-align: center;
    }

    .test-email {
        font-size: 0.9rem;
    }

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

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