:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --accent: #818cf8;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 5rem;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 4rem 2rem;
    animation: fadeIn 0.8s ease-out;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    height: 4.5rem;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo span {
    color: var(--text);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
}

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

.nav-auth {
    display: flex;
    gap: 1rem;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.input-section {
    display: flex;
    gap: 1rem;
    background: var(--card-bg);
    padding: 0.75rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.input-section:focus-within {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.input-section input[type="text"] {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 0.5rem 1rem;
    font-size: 1rem;
    outline: none;
}

input[type="text"]::placeholder {
    color: var(--text-muted);
}

.auth-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.85rem;
    padding: 1rem 1.25rem;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.auth-input:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.auth-input::placeholder {
    color: rgba(148, 163, 184, 0.4);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    padding-left: 0.4rem;
    transition: color 0.3s;
}

.form-group:focus-within label {
    color: var(--primary);
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

button:active {
    transform: scale(0.98);
}

.secondary-btn {
    background-color: rgba(51, 65, 85, 0.7);
    color: var(--text) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: inline-block;
    text-align: center;
}

.secondary-btn:hover {
    background-color: var(--primary);
    color: white !important;
    border-color: var(--primary);
}

#statusContainer {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--border);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#resultSection {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--border);
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

#videoTitle {
    font-size: 1.25rem;
    font-weight: 600;
}

.transcription-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: #0f172a;
    border-radius: 0.5rem;
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #e2e8f0;
}

.hidden {
    display: none !important;
}

footer {
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 0;
    margin-top: auto;
    backdrop-filter: blur(10px);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-info {
    text-align: left;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

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

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-modal {
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text);
    transform: rotate(90deg);
}

.modal-body p {
    margin-bottom: 1.5rem;
    color: var(--text);
}

.features {
    list-style: none;
    margin-bottom: 2rem;
}

.features li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #e2e8f0;
}

.premium-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.small {
    margin-top: 1rem;
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-muted);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar styling */
.transcription-container::-webkit-scrollbar {
    width: 8px;
}

.transcription-container::-webkit-scrollbar-track {
    background: var(--bg);
}

.transcription-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.transcription-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Pricing Page Styles */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.pricing-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    padding: 3rem 2.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-card:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.pricing-card.premium-highlight {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1.5px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
    z-index: 1;
}

.pricing-card.premium-highlight:hover {
    transform: scale(1.05) translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.3);
}

.premium-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.price-tag {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
}

.price-tag .currency {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 400;
}

.price-amount {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.pricing-card.premium-highlight .price-amount {
    background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.price-period {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: normal;
    margin-left: 4px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin-bottom: 3rem;
    text-align: left;
    flex: 1;
}

.pricing-features li {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pricing-features li.muted {
    opacity: 0.4;
}

.pricing-btn {
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: block;
}

.pricing-btn.primary {
    background: var(--primary);
    color: white;
}

.pricing-btn.primary:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.pricing-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pricing-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Usage Badge Under Input */
.usage-badge {
    display: block;
    width: max-content;
    margin: 0 auto 2.5rem auto;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: none; /* Controlled by JS */
    animation: fadeIn 0.5s ease-out;
}


.usage-badge span {
    color: var(--primary);
    font-weight: 700;
}

/* Authentication Pages */
.auth-page {
    background-color: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: authFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h1, .auth-header h2 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .forgot-link {
    display: block;
    text-align: right;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-form .forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.auth-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
}

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

.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-messages p {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
/* Pricing Toggle */
.pricing-toggle-wrapper { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 3rem; }
.switch { position: relative; display: inline-block; width: 64px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--card-bg); border: 2px solid var(--border); transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ''; height: 26px; width: 26px; left: 4px; bottom: 3px; background-color: var(--primary); transition: .4s; border-radius: 50%; }
input:checked + .slider:before { transform: translateX(30px); }
/* Checkout Redesign */
.checkout-wrapper { display: grid; grid-template-columns: 380px 1fr; gap: 2rem; width: 100%; max-width: 1000px; margin: 2rem auto; align-items: start; }
.order-summary-card { background: var(--card-bg); padding: 2.5rem; border-radius: 1.5rem; border: 1px solid var(--border); position: sticky; top: 6rem; }
.payment-form-card { background: var(--card-bg); padding: 2.5rem; border-radius: 1.5rem; border: 1px solid var(--border); }
.checkout-header { margin-bottom: 2rem; text-align: left; }
.checkout-header h2 { font-size: 1.75rem; margin-bottom: 0.5rem; color: #fff; }

.checkout-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.checkout-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.checkout-input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

@media (max-width: 900px) { .checkout-wrapper { grid-template-columns: 1fr; } .order-summary-card { position: static; } }