/* ============================================================================
   Web Speed Test - Official Website Styles
   Professional, Modern, Clean Design
   ============================================================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #60A5FA;
    --secondary: #64748B;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --background: #FFFFFF;
    --surface: #F8FAFC;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-light: #94A3B8;
    --border: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--success) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--background);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 16px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon svg {
    display: block;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 0;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stars {
    color: #FBBF24;
    font-size: 0.875rem;
}

.hero-visual {
    position: relative;
    height: 500px;
}

.app-preview {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}

.preview-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.preview-dots {
    display: flex;
    gap: 6px;
    margin-right: 12px;
}

.preview-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}

.preview-dots span:first-child { background: #FF5F56; }
.preview-dots span:nth-child(2) { background: #FFBD2E; }
.preview-dots span:nth-child(3) { background: #27C93F; }

.preview-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.preview-content {
    padding: 24px;
}

.speedometer-animation svg {
    width: 100%;
    height: auto;
}

.preview-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.metric {
    text-align: center;
    padding: 12px;
    background: var(--surface);
    border-radius: 8px;
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.metric-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.grade-a {
    color: var(--success);
}

.floating-card {
    position: absolute;
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    animation: float 3s ease-in-out infinite;
}

.card-1 {
    top: 20%;
    left: -20px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 30%;
    right: -10px;
    animation-delay: 1s;
}

.card-3 {
    bottom: 10%;
    left: 10%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon i {
    font-size: 1.75rem;
    color: white;
}

.feature-list {
    list-style: none;
    margin-top: 16px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.feature-list i {
    color: var(--success);
    font-size: 0.875rem;
}

/* How It Works */
.how-it-works {
    background: var(--surface);
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.step {
    text-align: center;
    flex: 1;
    max-width: 280px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow);
}

.step-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.step-arrow {
    font-size: 1.5rem;
    color: var(--text-light);
}

/* Metrics Showcase */
.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.metrics-list {
    margin-top: 32px;
}

.metric-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.metric-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

.metric-item h4 {
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.metric-item p {
    font-size: 0.875rem;
    margin: 0;
}

.metrics-preview {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-xl);
}

.preview-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
}

.card-header {
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.metric-row .value {
    font-weight: 600;
    color: var(--text-primary);
}

.grade-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border);
}

.grade-badge {
    background: var(--success);
    color: white;
    padding: 6px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.pricing-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s;
    position: relative;
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 24px;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--text-secondary);
}

.pricing-features i {
    color: var(--success);
}

/* Download Section */
.download {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.download .section-header h2,
.download .section-header p {
    color: white;
}

.download-card {
    background: white;
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
}

.download-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.download-icon i {
    font-size: 3rem;
    color: var(--primary);
}

.download-card h3 {
    color: var(--text-primary);
}

.download-meta {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.download-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.download-features span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.download-features i {
    color: var(--success);
}

.download-note {
    margin-top: 16px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.version-info {
    text-align: center;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.9);
}

.version-info a {
    color: white;
    text-decoration: underline;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.testimonial-rating {
    color: #FBBF24;
    margin-bottom: 16px;
}

.testimonial-text {
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary);
}

.author-info h4 {
    margin: 0;
    font-size: 1rem;
}

.author-info p {
    margin: 0;
    font-size: 0.875rem;
}

/* FAQ */
.faq {
    background: var(--surface);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.faq-item {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.faq-item h4 {
    margin-bottom: 12px;
}

.faq-item p {
    margin: 0;
}

/* Contact */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-methods {
    margin-top: 32px;
}

.contact-method {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--primary);
}

.contact-method h4 {
    margin-bottom: 4px;
}

.contact-method p {
    margin: 0;
}

.contact-form {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary);
}

.footer-links h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-newsletter h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
}

.newsletter-form button {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 24px;
}

.changelog-item {
    margin-bottom: 24px;
}

.changelog-item h4 {
    margin-bottom: 4px;
}

.changelog-item .date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: block;
    margin-bottom: 12px;
}

.changelog-item ul {
    list-style-position: inside;
    color: var(--text-secondary);
}

.changelog-item li {
    padding: 4px 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-menu.active {
        display: flex;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .showcase-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .download-features {
        flex-direction: column;
        gap: 12px;
    }
}