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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    overflow: visible;
    position: relative;
}

.nav-logo h2 {
    color: #6366f1;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    overflow: visible;
    flex-shrink: 0;
    min-width: 0;
}

.nav-link {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #6366f1;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #6366f1;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white !important;
    padding: 8px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.nav-cta::after {
    display: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.15"/><circle cx="20" cy="80" r="0.5" fill="white" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.btn {
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #6366f1;
    border: 2px solid #6366f1;
}

.btn-outline:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    opacity: 0.9;
}

.stat {
    text-align: center;
}

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

.hero-stats .stat-label {
    font-size: 0.9rem;
    color: white !important;
    opacity: 0.9;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: #f8fafc;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.section-header p {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Pricing Section */
.pricing {
    padding: 100px 0;
    background: white;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1250px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured {
    border-color: #6366f1;
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pricing-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 1rem;
}

.currency {
    font-size: 1.5rem;
    color: #6b7280;
}

.amount {
    font-size: 3rem;
    font-weight: 700;
    color: #1f2937;
}

.period {
    font-size: 1rem;
    color: #6b7280;
    margin-left: 0.25rem;
}

.pricing-header p {
    color: #6b7280;
}

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

.pricing-card .btn {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #374151;
}

.pricing-features i {
    color: #10b981;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

/* API Demo Section */
.api-demo {
    padding: 100px 0;
    background: #f8fafc;
    text-align: center;
}

.api-demo-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.code-example {
    background: white;
    border: 2px solid #6366f1;
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    text-align: left;
    position: relative;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.code-example:last-of-type {
    margin-bottom: 3rem;
}

.code-example:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.3);
}

.api-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.code-header {
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    padding: 1rem 1.5rem;
    margin: -2.5rem -2.5rem 1.5rem -2.5rem;
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-title {
    color: white;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 1rem;
}

.code-lang {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.code-example pre {
    margin: 0;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #1f2937;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
    text-align: left;
}

.code-example pre code {
    color: #1f2937;
}

/* Syntax highlighting */
.code-example .json-key {
    color: #6366f1;
    font-weight: 600;
}

.code-example .json-string {
    color: #059669;
    font-weight: 500;
}

.code-example .json-comment {
    color: #6b7280;
    font-style: italic;
}

.api-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

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

.benefit-item i {
    color: #10b981;
    font-size: 1.5rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.benefit-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.benefit-item p {
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Waitlist Section */
.waitlist {
    padding: 100px 0;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: white;
}

.waitlist-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.waitlist-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.waitlist-text p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.waitlist-benefits {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.benefit i {
    color: #fbbf24;
    font-size: 1.2rem;
}

.waitlist-form-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.waitlist-form h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.form-note {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.success-message {
    text-align: center;
    padding: 2rem;
}

.success-message i {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.success-message h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.btn-loading {
    display: none;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: #6366f1;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-brand p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.footer-column h4 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #6366f1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

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

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

    .pricing-card.featured {
        transform: none;
    }

    .code-example {
        max-width: 100%;
        margin: 0 0 1.5rem 0;
        padding: 2rem;
    }

    .code-example:last-of-type {
        margin-bottom: 2rem;
    }

    .code-header {
        margin: -2rem -2rem 1rem -2rem;
        padding: 0.75rem 1rem;
    }

    .code-title {
        font-size: 0.9rem;
    }

    .code-lang {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }

    .api-badge {
        font-size: 0.8rem;
        padding: 6px 18px;
    }

    .api-benefits {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .waitlist-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .waitlist-text {
        text-align: center;
    }

    .form-group {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {

    .container,
    .nav-container,
    .hero-container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .feature-card,
    .pricing-card,
    .waitlist-form-container {
        padding: 1.5rem;
    }

    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.hero-content>* {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-title {
    animation-delay: 0.2s;
}

.hero-description {
    animation-delay: 0.4s;
}

.hero-buttons {
    animation-delay: 0.6s;
}

.hero-stats {
    animation-delay: 0.8s;
}

/* U
ser Navigation Styles */
.auth-nav {
    display: flex;
    align-items: center;
}

.guest-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.guest-nav .nav-cta {
    margin-left: 1.0rem;
}

.user-nav {
    position: relative;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #374151;
    font-weight: 500;
}

.user-menu-toggle:hover {
    background-color: #f3f4f6;
    color: #6366f1;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.user-name {
    font-size: 0.9rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-menu-toggle:hover i {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 8px;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 12px 16px;
    text-decoration: none;
    color: #374151;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    color: #6366f1;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 8px 0;
}

.logout-btn {
    color: #ef4444 !important;
}

.logout-btn:hover {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
}

/* Mobile Navigation Adjustments */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }

    .guest-nav {
        gap: 1rem;
    }

    .user-name {
        display: none;
    }

    .user-dropdown {
        right: -10px;
        min-width: 180px;
    }

    .nav-cta {
        padding: 6px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
    }

    .nav-menu {
        gap: 0.5rem;
    }

    .guest-nav {
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .user-menu-toggle {
        padding: 6px 8px;
    }

    .user-dropdown {
        right: -15px;
        min-width: 160px;
    }
}

/* ==
=== USER NAVIGATION STYLES ===== */

/* Auth Navigation Container */
.auth-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

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

.user-nav {
    position: relative;
    display: flex;
    align-items: center;
}

/* User Menu Styles */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid #e5e7eb;
    cursor: pointer;
    padding: 0.5rem 0.875rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
    min-width: 0;
    max-width: 200px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-menu-toggle:hover {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.user-menu-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
}

/* User Avatar */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    background-color: #f3f4f6;
}

.user-menu-toggle:hover .user-avatar {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: scale(1.05);
}

/* User Name */
.user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
    /* Prevent overflow */
    flex-shrink: 1;
    /* Allow shrinking */
}

/* Chevron Icon */
.user-menu-toggle .fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: #9ca3af;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.user-menu-toggle:hover .fa-chevron-down {
    color: #6366f1;
    transform: rotate(180deg);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Dropdown Items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 0;
}

.dropdown-item:hover {
    background-color: #f8fafc;
    color: #6366f1;
}

.dropdown-item:active {
    background-color: #f1f5f9;
}

.dropdown-item i {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.dropdown-item:hover i {
    color: #6366f1;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background-color: #f3f4f6;
    margin: 0.5rem 0;
}

/* Logout Button Special Styling */
.logout-btn {
    color: #ef4444 !important;
    border-top: 1px solid #f3f4f6;
    margin-top: 0.5rem;
    padding-top: 0.875rem;
}

.logout-btn:hover {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
}

.logout-btn i {
    color: #ef4444 !important;
}

.logout-btn:hover i {
    color: #dc2626 !important;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 0.75rem;
    }

    .guest-nav {
        gap: 0.75rem;
    }

    .user-menu-toggle {
        padding: 0.5rem;
        max-width: 150px;
    }

    .user-name {
        max-width: 80px;
        font-size: 0.85rem;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    .user-dropdown {
        right: -10px;
        min-width: 200px;
    }

    .nav-cta {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
    }

    .nav-menu {
        gap: 0.5rem;
    }

    .guest-nav {
        gap: 0.5rem;
    }

    .user-menu-toggle {
        padding: 0.375rem;
        max-width: 120px;
    }

    .user-name {
        display: none;
        /* Hide name on very small screens */
    }

    .user-avatar {
        width: 30px;
        height: 30px;
    }

    .user-dropdown {
        right: -15px;
        min-width: 180px;
        left: auto;
        transform-origin: top right;
    }

    .dropdown-item {
        padding: 0.75rem 0.875rem;
        font-size: 0.85rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .user-dropdown {
        right: -20px;
        min-width: 160px;
    }

    .dropdown-item {
        padding: 0.625rem 0.75rem;
    }
}

/* High DPI screens - make sure avatars look crisp */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .user-avatar {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Focus states for accessibility */
.user-menu-toggle:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.dropdown-item:focus {
    background-color: #f8fafc;
    color: #6366f1;
    outline: none;
}

/* Animation for smooth dropdown appearance */
@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

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

.user-dropdown.show {
    animation: dropdownSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure navigation doesn't break on overflow */
.nav-container {
    overflow: visible;
}

.nav-menu {
    overflow: visible;
    flex-wrap: nowrap;
    min-width: 0;
}

/* Fix for very long email addresses */
.user-name {
    word-break: break-all;
    line-height: 1.2;
}

/* Ensure dropdown stays within viewport */
@media (max-width: 320px) {
    .user-dropdown {
        right: 0;
        left: auto;
        min-width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
    }
}
/
* ===== DASHBOARD STYLES ===== */

.dashboard-section {
    padding: 120px 0 80px;
    background: #f8fafc;
    min-height: 100vh;
}

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

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    font-size: 1.1rem;
    color: #6b7280;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header i {
    font-size: 1.1rem;
}

.card-content {
    padding: 2rem;
}

/* Profile Card Styles */
.profile-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: none; /* Hidden by default, shown via JavaScript */
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    border: 3px solid #e5e7eb;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
}

.avatar-fallback i {
    color: white !important; /* Ensure icon is white on colored background */
    font-size: 2rem;
}

.profile-details h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.profile-details p {
    color: #6b7280;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.profile-provider {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f3f4f6;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
}

.profile-provider i {
    color: #6366f1;
}

/* Subscription Card Styles */
.subscription-status {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6b7280;
    font-size: 1rem;
}

.subscription-info {
    margin-bottom: 1.5rem;
}

.subscription-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.plan-status {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.plan-status.active {
    background: #d1fae5;
    color: #065f46;
}

.plan-status.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.subscription-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: #6b7280;
    font-size: 0.9rem;
}

.detail-value {
    color: #1f2937;
    font-weight: 500;
}

.subscription-actions {
    display: flex;
    gap: 1rem;
}

.no-subscription {
    text-align: center;
    padding: 2rem 0;
}

.no-subscription i {
    font-size: 3rem;
    color: #f59e0b;
    margin-bottom: 1rem;
}

.no-subscription h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.no-subscription p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* API Key Card Styles */
.api-key-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #6b7280;
    font-size: 1rem;
    min-height: 120px;
}

.api-key-display {
    margin-bottom: 1.5rem;
}

.api-key-display label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.api-key-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.api-key-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    background: #f9fafb;
    color: #1f2937;
}

.api-key-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.api-key-info {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.api-key-info p {
    margin: 0;
    color: #92400e;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.api-key-info i {
    color: #f59e0b;
}

.api-key-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.no-api-key {
    text-align: center;
    padding: 2rem 0;
}

.no-api-key i {
    font-size: 3rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.no-api-key h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.no-api-key p {
    color: #6b7280;
    line-height: 1.6;
}

/* Usage Card Styles */
.usage-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.usage-note {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.usage-note p {
    margin: 0;
    color: #0c4a6e;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.usage-note i {
    color: #0ea5e9;
}

/* Message Container Styles */
.message-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.message {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease;
}

.message.success {
    border-color: #10b981;
    background: #f0fdf4;
}

.message.success i {
    color: #10b981;
}

.message.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.message.error i {
    color: #ef4444;
}

.message-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 1rem;
    margin-left: auto;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.message-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #374151;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    backdrop-filter: blur(4px);
}

.modal {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-content {
    padding: 2rem;
}

.modal-content p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.modal-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive Design for Dashboard */
@media (max-width: 768px) {
    .dashboard-section {
        padding: 100px 0 60px;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dashboard-card {
        border-radius: 16px;
    }
    
    .card-header {
        padding: 1.25rem 1.5rem;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .subscription-actions,
    .api-key-actions {
        flex-direction: column;
    }
    
    .api-key-input-group {
        flex-direction: column;
    }
    
    .message-container {
        right: 15px;
        left: 15px;
        max-width: none;
    }
    
    .modal {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .modal-actions {
        flex-direction: column-reverse;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        margin-bottom: 2rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.75rem;
    }
    
    .card-header h2 {
        font-size: 1.1rem;
    }
    
    .card-content {
        padding: 1.25rem;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    .usage-stats {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
}
/* =
==== SUBSCRIPTION PAGE STYLES ===== */

.subscription-section {
    padding: 120px 0 80px;
    background: #f8fafc;
    min-height: 100vh;
}

.subscription-section .section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.subscription-section .section-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.subscription-section .section-header p {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Plan Comparison Table */
.plan-comparison {
    margin-top: 5rem;
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.plan-comparison h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
}

.comparison-table {
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.comparison-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
}

.comparison-table th:first-child {
    background: white;
    font-weight: 700;
    color: #1f2937;
}

.comparison-table td:first-child {
    font-weight: 600;
    color: #374151;
}

.comparison-table tr:hover {
    background: #f8fafc;
}

/* Enhanced Button Loading States */
.btn .btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Mobile Responsive for Subscription Page */
@media (max-width: 768px) {
    .subscription-section .section-header h1 {
        font-size: 2.5rem;
    }
    
    .subscription-section .section-header p {
        font-size: 1.1rem;
    }
    
    .plan-comparison {
        padding: 2rem;
        margin-top: 3rem;
    }
    
    .plan-comparison h2 {
        font-size: 1.75rem;
    }
    
    .comparison-table {
        font-size: 0.8rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .subscription-section {
        padding: 100px 0 60px;
    }
    
    .subscription-section .section-header h1 {
        font-size: 2rem;
    }
    
    .plan-comparison {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .comparison-table {
        font-size: 0.75rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.25rem;
    }
}/*
 ===== NOTIFICATION STYLES ===== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    animation: slideInRight 0.3s ease-out;
    display: none;
}

.notification.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.notification.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.notification-content i:first-child {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-content span {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: inherit;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

.notification-close i {
    font-size: 0.9rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsive notifications */
@media (max-width: 480px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification-content {
        padding: 0.875rem 1rem;
    }
    
    .notification-content span {
        font-size: 0.9rem;
    }
}