/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    z-index: 1000;
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

.demo-header h1 {
    font-size: 3.9rem; /* Increased from 3rem by 30% */
    font-weight: 700;
    margin-bottom: 1.3rem; /* Increased from 1rem by 30% */
    text-shadow: 0 2.6px 5.2px rgba(0,0,0,0.1);
}

.demo-header p {
    font-size: 1.56rem; /* Increased from 1.2rem by 30% */
    opacity: 0.9;
    font-weight: 400;
}

/* Signup Card */
.signup-card {
    background: white;
    border-radius: 20px;
    padding: 3.9rem; /* Increased from 3rem by 30% */
    box-shadow: 0 26px 52px rgba(0,0,0,0.1); /* Increased shadow to match new size */
    margin-bottom: 3.9rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Demo Title */
.demo-title {
    text-align: center;
    margin-bottom: 2rem;
}

.demo-title h2 {
    color: #2d3748;
    font-size: 2.34rem; /* Increased from 1.8rem by 30% */
    font-weight: 600;
    margin: 0 0 0.65rem 0;
}

.demo-subtitle {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.8;
}

/* NPM Badge */
.npm-badge-container {
    margin: 1rem 0 0.5rem 0;
    display: flex;
    justify-content: center;
}

.npm-badge {
    border-radius: 4px;
    height: 20px;
    transition: transform 0.2s ease;
}

.npm-badge:hover {
    transform: scale(1.05);
}

/* Repository Links */
.repo-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.link-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.repo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3);
    min-width: 140px;
    justify-content: center;
}

.repo-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(55, 65, 81, 0.4);
    text-decoration: none;
    color: white;
}

.repo-badge.npm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.repo-badge.npm:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.repo-badge.about {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.repo-badge.about:hover {
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.repo-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.repo-badge:hover .repo-arrow {
    transform: translateX(2px);
}

/* Form Styles */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

.email-input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    align-items: center;
}

.email-input-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
    justify-content: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem;
}

.form-group label {
    font-weight: 500;
    color: #2d3748;
    font-size: 0.9rem;
}

.form-group input {
    padding: 1.3rem;
    border: 2px solid #e2e8f0;
    border-radius: 15.6px;
    font-size: 1.3rem;
    transition: all 0.2s ease;
    background: #f7fafc;
    width: 100%;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Input-Button Row */
.input-button-row {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

.input-button-row input {
    flex: 1;
    width: 100%;
}

.input-button-row .signup-btn {
    margin: 0;
    white-space: nowrap;
    min-width: 160px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .email-input-row {
        flex-direction: column;
        align-items: center;
        padding: 0;
        max-width: 280px;
    }

    .input-button-row {
        flex-direction: column;
        align-items: center;
    }

    .input-button-row input,
    .input-button-row .signup-btn {
        width: 100%;
    }
}

/* Signup Button */
.signup-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 160px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    line-height: normal;
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.signup-btn.loading .btn-text {
    opacity: 0;
}

.signup-btn.loading .btn-spinner {
    opacity: 1;
}

.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Results Section */
    .provider-detection {
        min-height: 60px;
        margin-top: 0.5rem;
        transition: all 0.3s ease;
        width: 100%;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

.results-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #16a34a;
    border-radius: 16px;
    padding: 2rem;
    animation: slideIn 0.5s ease;
}

.results-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.results-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.results-title h3 {
    color: #166534;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.results-title p {
    color: #16a34a;
    font-size: 0.9rem;
    margin: 0;
}

.results-content p {
    color: #166534;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.detection-details {
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.detection-details h4 {
    color: #166534;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.detection-summary {
    background: rgba(255,255,255,0.5);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

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

.detail-value {
    color: #1f2937;
    font-size: 0.9rem;
    text-align: right;
    max-width: 60%;
    word-break: break-all;
}

.toggle-btn {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-btn:hover {
    background: rgba(0,0,0,0.1);
}

.raw-response {
    margin-top: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.raw-response.show {
    opacity: 1;
    max-height: 500px;
}

.raw-response.hide {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
}

.raw-response pre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.8rem;
    font-size: 0.8rem;
    color: #475569;
    overflow-x: auto;
    margin: 0;
    white-space: pre-wrap;
}

.inbox-button {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 0.5rem;
}

.inbox-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.4);
}

/* Business email styling - now using default green */
.results-card.business {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #16a34a;
}

.results-card.business .results-title h3,
.results-card.business .results-content p,
.results-card.business .detection-details h4 {
    color: #166534;
}

.results-card.business .results-title p {
    color: #16a34a;
}

.results-card.business .inbox-button {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

/* Proxy service styling */
.results-card.proxy {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: #a855f7;
}

.results-card.proxy .results-title h3,
.results-card.proxy .results-content p,
.results-card.proxy .detection-details h4 {
    color: #7c2d12;
}

.results-card.proxy .results-title p {
    color: #a855f7;
}

.results-card.proxy .inbox-button {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

.proxy-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.proxy-text {
    font-size: 0.9rem;
    color: #7c2d12;
    line-height: 1.5;
}

/* Unknown provider styling */
.results-card.unknown {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.results-card.unknown .results-title h3,
.results-card.unknown .results-content p,
.results-card.unknown .detection-details h4 {
    color: #92400e;
}

.results-card.unknown .results-title p {
    color: #f59e0b;
}

/* Footer */
.footer {
    text-align: center;
    color: rgba(255,255,255,0.8);
    padding: 2rem 0;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

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

/* About Page Styles */
.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 1rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

/* Features */
.features-comprehensive {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.feature-emoji {
    font-size: 2rem;
}

.feature-content {
    color: #374151;
    line-height: 1.6;
    font-size: 0.9rem;
    text-align: center;
}

.feature-content strong {
    color: #1f2937;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

/* Security Section */
.security-overview {
    margin-top: 2rem;
}

.security-features {
    display: grid;
    gap: 1rem;
}

.security-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 12px;
    padding: 1.25rem;
    transition: transform 0.3s ease;
}

.security-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.security-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
}

.security-content {
    color: #166534;
    line-height: 1.6;
    font-size: 0.95rem;
}

.security-content strong {
    color: #14532d;
    font-weight: 600;
}

/* Problem/Solution */
.problem-solution {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.problem, .solution {
    padding: 1.5rem;
    border-radius: 12px;
}

.problem {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
}

.solution {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
}

.problem h3, .solution h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.problem h3 {
    color: #991b1b;
}

.solution h3 {
    color: #166534;
}

.problem ul, .solution ul {
    list-style: none;
    padding: 0;
}

.problem li, .solution li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    color: #374151;
    line-height: 1.5;
}

.problem li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #dc2626;
    font-weight: bold;
}

.solution li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: bold;
}

/* Use Cases */
.use-cases {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.use-cases {
    grid-template-columns: repeat(4, 1fr);
}

.use-cases.tools-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Special grid for Built With Amazing Tools section */

.use-case {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.use-case h3 {
    color: #1e40af;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.use-case p {
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Technical Details */
.technical-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.detection-method {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border: 1px solid #c084fc;
    border-radius: 12px;
    padding: 1rem;
}

.detection-method h3 {
    color: #7c2d12;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.detection-method p {
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Getting Started */
.getting-started {
    margin-top: 2rem;
}

.install-section, .usage-section {
    margin-bottom: 2rem;
}

.install-section h3, .usage-section h3 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.getting-started pre {
    background: #1a202c;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.4;
}

.getting-started code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Install command */
.install-command {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.install-command:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.copy-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.install-command:hover .copy-indicator {
    opacity: 1;
}

/* Navigation */
.navigation-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.primary-nav-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.external-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-button.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.nav-button:not(.primary) {
    background: #f8fafc;
    color: #374151;
    border-color: #e2e8f0;
}

.nav-button:not(.primary):hover {
    background: #f1f5f9;
    border-color: #cbd5e0;
    text-decoration: none;
    color: #374151;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }
    
    .container {
        max-width: 100vw;
        padding: 1rem;
    }
    
    .demo-header {
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .demo-header h1 {
        font-size: 2rem;
    }
    
    .signup-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
/* Keep input and button centered on mobile */
    .email-input-container {
        padding: 0 1rem;
    }

    .email-input-row {
        flex-direction: column;
        align-items: center;
        max-width: 280px;
        padding: 0;
    }
    
    .input-button-row {
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 280px;
    }
    
    .input-button-row input {
        width: 100%;
        text-align: center;
    }

    .input-button-row .signup-btn {
        width: 100%;
        min-width: unset;
        margin-top: 0.5rem;
        padding: 1rem;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Stack repository links on mobile */
    .link-group {
        flex-direction: column;
        align-items: center;
    }
    
    .repo-badge {
        width: 200px;
    }
    
    /* About page mobile responsiveness */
    .features-comprehensive {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .security-features {
        gap: 0.75rem;
    }
    
    .security-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .detail-value {
        max-width: 100%;
        text-align: left;
    }
    
    .problem-solution {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .use-cases:not(.tools-grid), .tools-grid {
        grid-template-columns: 1fr !important;
    }
    
    .technical-details {
        grid-template-columns: 1fr;
    }
    
    .external-links {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-button {
        width: 200px;
        justify-content: center;
    }
}
