/* Design System & Token Declarations */
:root {
    --bg-main: #FAFAFA;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-input: #FFFFFF;
    
    --primary: #1E2B4D; /* Navy Blue */
    --primary-hover: #151E36;
    --primary-glow: rgba(30, 43, 77, 0.2);
    
    --accent: #2563EB; /* Bright Blue */
    --accent-hover: #1D4ED8;
    --accent-glow: rgba(37, 99, 235, 0.2);
    
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    
    --border-color: rgba(0, 0, 0, 0.1);
    --border-focus: #1E2B4D;
    
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    
    --font-sans: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(30, 43, 77, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Navigation bar */
.navbar {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    mix-blend-mode: multiply;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition-smooth);
}

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

.nav-auth {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hero Section */
.hero {
    padding: 100px 0 60px 0;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: #3B82F6;
    font-size: 14px;
    font-weight: 600;
    border-radius: 9999px;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #111827 30%, #1E2B4D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 40px auto;
    font-weight: 400;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: var(--text-secondary);
}

.btn-accent {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Showcase Animation (CSS Extension Mockup) */
.showcase-wrapper {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.showcase-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 800px;
    height: 400px;
    padding: 24px;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    animation: float 6s ease-in-out infinite;
}

.showcase-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background-color: #EF4444; }
.dot-yellow { background-color: #F59E0B; }
.dot-green { background-color: #10B981; }

.showcase-address {
    flex-grow: 1;
    background: #F3F4F6;
    border-radius: var(--radius-sm);
    height: 28px;
    margin-left: 12px;
    display: flex;
    align-items: center;
    padding-left: 12px;
    color: var(--text-muted);
    font-size: 13px;
}

.showcase-extensions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 12px;
}

.ext-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: transparent;
    cursor: default;
    position: relative;
    font-size: 16px;
}

.ext-icon:hover {
    background: #F3F4F6;
}

.ext-icon.app-icon img {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    mix-blend-mode: multiply;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s;
}

/* Animation sequence for recording -> transcribing -> idle */
@keyframes extension-state {
    0%, 33% {
        /* Recording state */
        filter: grayscale(0%);
        opacity: 1;
    }
    34%, 66% {
        /* Transcribing state */
        filter: grayscale(0%);
        opacity: 0.7;
    }
    67%, 100% {
        /* Idle state */
        filter: grayscale(100%);
        opacity: 0.8;
    }
}

.ext-icon.app-icon img.animated-icon {
    animation: extension-state 10s infinite;
}

.recording-status-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--error);
    border: 1px solid var(--bg-card);
    opacity: 0;
    animation: badge-state 10s infinite;
}

@keyframes badge-state {
    0%, 33% {
        /* Recording: Red pulse */
        background-color: #EF4444;
        opacity: 1;
        box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4);
    }
    34%, 66% {
        /* Transcribing: Blue/Yellow spin or solid color */
        background-color: #F59E0B;
        opacity: 1;
        box-shadow: none;
    }
    67%, 100% {
        /* Idle: Hidden */
        opacity: 0;
    }
}

.pin-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 14px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
    z-index: 10;
    animation: float-pin 3s ease-in-out infinite;
}

@keyframes float-pin {
    0%, 100% { transform: translateY(0) rotate(15deg); }
    50% { transform: translateY(-3px) rotate(15deg); }
}

.ext-tooltip {
    position: absolute;
    top: 36px;
    right: -10px;
    background: #1E293B;
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ext-tooltip::after {
    content: '🔴 Recording';
    animation: tooltip-content-state 10s infinite;
}

.ext-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    right: 20px;
    width: 8px;
    height: 8px;
    background: #1E293B;
    transform: rotate(45deg);
}

@keyframes tooltip-content-state {
    0%, 33% { content: '🔴 Recording'; }
    34%, 66% { content: '⏳ Transcribing...'; }
    67%, 100% { content: '📌 Pinned & Ready'; }
}

.showcase-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.mock-textarea {
    width: 80%;
    height: 120px;
    background: #F8FAFC;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: var(--font-sans);
    resize: none;
    outline: none;
    transition: var(--transition-smooth);
}

.mock-textarea:focus {
    border-color: var(--primary);
    background: #FFFFFF;
}

.troubleshoot-tip {
    width: 80%;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    background: #F3F4F6;
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: left;
    border-left: 3px solid var(--primary);
}

.troubleshoot-tip a {
    color: var(--primary);
    text-decoration: underline;
}

.mock-extension-overlay {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.recording-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #EF4444;
    animation: pulse-glow 1.5s infinite;
}

/* Features Grid */
.features {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 48px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.05);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Pricing Section */
.pricing {
    padding: 80px 0;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.05) 0%, transparent 60%);
}

.pricing-cards {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 32px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    position: relative;
}

.pricing-card.premium {
    border: 2px solid var(--primary);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.15);
}

.popular-badge {
    position: absolute;
    top: -16px;
    right: 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
}

.plan-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 44px;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
}

.plan-price span {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 4px;
}

.plan-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.plan-features {
    list-style: none;
    margin-bottom: 40px;
    flex-grow: 1;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.plan-features li::before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
}

.plan-features li.unavailable {
    color: var(--text-muted);
}

.plan-features li.unavailable::before {
    content: "✕";
    color: var(--error);
}

/* User Dashboard & Portal Section */
.dashboard-section {
    padding: 60px 0;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    backdrop-filter: blur(12px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .dashboard-card {
        grid-template-columns: 1fr;
    }
}

.dashboard-info h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.user-email {
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 24px;
}

.subscription-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
}

.subscription-badge.pro {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.subscription-badge.free {
    background: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.usage-tracker {
    margin-top: 24px;
}

.usage-bar {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.5s ease-in-out;
}

.usage-text {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.dashboard-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-end;
}

@media (max-width: 768px) {
    .dashboard-actions {
        align-items: flex-start;
    }
}

/* Modals & Forms */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #FFFFFF;
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    height: 48px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 16px;
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition-smooth);
}

.form-input:focus {
    border-color: var(--border-focus);
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

.form-switch {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 24px;
}

.form-switch a {
    color: var(--accent);
    font-weight: 600;
}

.form-switch a:hover {
    text-decoration: underline;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #FFFFFF;
    color: var(--text-primary);
    padding: 12px 20px;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition-smooth);
}

.toast.active {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    border-left-color: var(--error);
}

.toast.success {
    border-left-color: var(--success);
}

/* FAQ Accordions */
.faq {
    padding: 80px 0;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 24px 0;
}

.faq-question {
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    color: var(--text-secondary);
    font-size: 15px;
    margin-top: 12px;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}
