/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #027e6f;
    --primary-dark: #016a5c;
    --primary-light: #e6f2f1;
    --accent: #667eea;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.9);
    --glass-shadow: 0 10px 40px -10px rgba(2, 126, 111, 0.15);
    --blur: blur(16px);
    --radius-lg: 16px;
    --radius-md: 10px;
}

/* General Body Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    color: var(--text-main);
    background: #f3f4f6;
    /* Fallback */
    background: var(--bg-gradient);
    min-height: 100vh;
    line-height: 1.6;
}

/* Glass Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
}

/* Hide any errant menu buttons */
button[aria-label="Menu"],
.menu-button,
[class*="menu-btn"],
[id*="menu-btn"],
.mobile-menu-toggle {
    display: none !important;
}

/* Header and Navbar */
.main-header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1c1c1c;
    font-weight: 600;
    font-size: 1.5rem;
}

.logo img {
    height: 40px;
    margin-right: 0.5rem;
    border-radius: 8px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #027e6f;
}

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

.header-actions .btn {
    margin-left: 0;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-sizing: border-box;
    border: none;
    cursor: pointer;
    display: inline-block;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(2, 126, 111, 0.2), 0 2px 4px -1px rgba(2, 126, 111, 0.1);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(2, 126, 111, 0.3), 0 3px 6px -1px rgba(2, 126, 111, 0.15);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-large {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 55%;
    padding-right: 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: #1c1c1c;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: #555;
    line-height: 1.6;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.02);
}

/* Features Section */
.features-section {
    padding: 6rem 2rem;
    background-color: #fff;
    text-align: center;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 4rem;
    color: #1c1c1c;
    line-height: 1.2;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 4rem 1rem;
        gap: 3rem;
    }

    .hero-content {
        max-width: 100%;
        padding-right: 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: var(--glass-border);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.feature-card img {
    height: 64px;
    width: 64px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    filter: brightness(0) saturate(100%) invert(15%) sepia(7%) saturate(1256%) hue-rotate(169deg) brightness(92%) contrast(94%);
    transition: filter 0.3s ease;
}

.feature-card:hover img {
    filter: brightness(0) saturate(100%) invert(47%) sepia(79%) saturate(2476%) hue-rotate(162deg) brightness(95%) contrast(101%);
}

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

.feature-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

/* Pricing Section */
.pricing-section {
    padding: 6rem 2rem;
    text-align: center;
    background-color: #f9f9f9;
}

.pricing-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    flex: 1;
    max-width: 350px;
}

.pricing-card.featured {
    border: 2px solid #027e6f;
    transform: scale(1.05);
}

.pricing-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.price span {
    font-size: 1rem;
    color: #777;
}

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

.pricing-features li {
    margin-bottom: 0.5rem;
}

/* About Section */
.about-section {
    background-color: #027e6f;
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Footer */
.main-footer {
    background-color: #1c1c1c;
    color: #fff;
    padding: 3rem 2rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 2rem;
    border-bottom: 1px solid #444;
}

.footer-logo span {
    font-size: 1.5rem;
    font-weight: 600;
}

.footer-logo img {
    height: 30px;
    margin-right: 0.5rem;
}

.footer-links h4 {
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    text-decoration: none;
    color: #ccc;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 2rem auto 0;
    font-size: 0.9rem;
    color: #aaa;
}

.footer-bottom a {
    color: #aaa;
    text-decoration: none;
}

/* Checkout Page Styles */
.checkout-section {
    padding: 4rem 2rem;
}

.checkout-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.order-summary,
.payment-form {
    flex: 1;
}

.order-summary h2,
.payment-form h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
}

.plan-details {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.plan-name {
    font-weight: 600;
}

.pro-features {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
    color: #555;
}

.pro-features li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.pro-features li::before {
    content: '✓';
    color: #027e6f;
    position: absolute;
    left: 0;
}

.total-due {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 600;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.btn-full {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
}

.payment-security {
    display: flex;
    align-items: center;
    margin-top: 1.5rem;
    color: #777;
}

.payment-security img {
    height: 20px;
    margin-right: 0.5rem;
}

/* Contact Section */
.contact-section {
    padding: 4rem 2rem;
    text-align: center;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-container p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #555;
}

/* =============================================
   AUTHENTICATION STYLES
   ============================================= */

/* User Menu */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.user-info:hover {
    background-color: #f8f9fa;
}

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

.user-name {
    font-weight: 500;
    color: #333;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

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

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Authentication Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.auth-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    margin: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease;
    overflow: hidden;
    /* Ensure content doesn't overflow */
}

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

.auth-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background-color: #f0f0f0;
}

.auth-body {
    padding: 1.5rem 2rem;
}

.btn-google {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    background: white;
    color: #333;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
    box-sizing: border-box;
    /* Include padding and border in width */
}

.btn-google:hover {
    border-color: #4285F4;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: #666;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
    z-index: 1;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    /* Include padding and border in width */
}

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

.btn-full {
    width: 100%;
    margin-bottom: 1rem;
}

.auth-footer {
    text-align: center;
    color: #666;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
}

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

.auth-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-message.loading {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.auth-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.auth-message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Profile Modal Styles */
.profile-modal-content {
    max-width: 800px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
}

.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: -2rem -2rem 2rem -2rem;
    padding: 2rem;
    border-radius: 12px 12px 0 0;
}

.profile-header h2 {
    margin: 0;
    color: white;
}

.profile-body {
    padding: 0;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #667eea;
    object-fit: cover;
}

.profile-name-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: #333;
}

.profile-email {
    color: #666;
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

.admin-badge,
.user-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.user-badge {
    background: linear-gradient(135deg, #4ecdc4, #44bd87);
    color: white;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-info-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.profile-info-card h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.profile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.profile-info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.info-value {
    color: #333;
    font-weight: 400;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.user-id {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    background: #f1f3f4;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.admin-privileges {
    color: #ff6b6b;
    font-weight: 600;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid #e1e5e9;
}

.profile-actions .btn {
    min-width: 120px;
}

/* Subscription-specific styles */
.subscription-card {
    border-left: 4px solid #667eea;
}

.subscription-type {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-activated {
    color: #28a745;
    font-weight: 600;
}

.status-expired {
    color: #dc3545;
    font-weight: 600;
}

.status-not_found {
    color: #6c757d;
    font-weight: 600;
}

.days-warning {
    color: #fd7e14;
    font-weight: 600;
}

.license-key {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    background: #f1f3f4;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.license-key:hover {
    background: #e1e5e9;
}

.no-subscription-card {
    border-left: 4px solid #fd7e14;
    text-align: center;
}

.no-subscription-message {
    padding: 1rem;
}

.no-subscription-message p {
    margin: 0.5rem 0;
    color: #666;
}

.no-subscription-message p:first-child {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-modal-content {
        margin: 0.5rem;
        max-width: 95%;
    }

    .auth-header {
        padding: 1rem 1.5rem;
    }

    .auth-body {
        padding: 1rem 1.5rem;
    }

    .user-dropdown {
        right: -20px;
        min-width: 140px;
    }

    .user-name {
        display: none;
    }

    /* Profile Modal Mobile Styles */
    .profile-modal-content {
        width: 95vw;
        max-height: 90vh;
    }

    .profile-avatar-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profile-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .info-value {
        text-align: left;
        max-width: 100%;
    }

    .profile-actions {
        flex-direction: column;
    }
}