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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #0f172a;
    --accent: #22d3ee;
    --text-light: #94a3b8;
    --bg-dark: #0a0e1a;
    --bg-card: rgba(15, 23, 42, 0.6);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --border-color: rgba(99, 102, 241, 0.2);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: #fff;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Animated background */
.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.3;
}

.bg-animation::before,
.bg-animation::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
}

.bg-animation::before {
    background: var(--gradient-1);
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.bg-animation::after {
    background: var(--gradient-2);
    bottom: -200px;
    left: -200px;
    animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    33% { transform: translateY(-30px) translateX(30px); }
    66% { transform: translateY(30px) translateX(-20px); }
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 40px;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.cta-header {
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.cta-header:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Hero Section */
.hero {
    padding: 150px 40px 0px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

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

/* Transformation Visual */
.transformation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin: 80px auto;
    max-width: 1200px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
    padding: 0 40px;
}

.transform-box {
    width: 400px;
    height: 300px;
    background: var(--bg-card);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.transform-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.transform-box.paper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.paper-content h4 {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 18px;
}

.math-notation {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.8;
    text-align: center;
}

.transform-box.code {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(34, 211, 238, 0.1) 100%);
    display: flex;
    align-items: center;
}

.transform-box.code pre {
    color: var(--accent);
    font-size: 14px;
    overflow: hidden;
    width: 100%;
}

.arrow {
    font-size: 40px;
    color: var(--primary);
    display: inline-block;
}

/* Pain Points */
.pain-points {
    max-width: 1200px;
    margin: 100px auto;
    padding: 0 40px;
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.point-card {
    background: var(--bg-card);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.point-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.point-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.point-card:hover::before {
    transform: scaleX(1);
}

.point-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #fff;
}

.point-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Pricing Section */
.pricing-section {
    padding: 100px 40px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(34, 211, 238, 0.05) 100%);
    margin: 100px 0;
}

.pricing-section h2 {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 60px;
}

.pricing-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto 40px;
}

.pricing-tier {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 30px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

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

.pricing-tier.featured {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.featured-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-1);
    color: white;
    padding: 6px 24px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.pricing-tier h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #fff;
}

.tier-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 30px;
}

.tier-price span {
    color: var(--text-light);
    font-weight: 400;
}

.tier-features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    flex-grow: 1;
}

.tier-features li {
    padding: 10px 0;
    color: var(--text-light);
    font-size: 0.95rem;
    position: relative;
    padding-left: 25px;
}

.tier-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.availability-status {
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    display:none;
}

.availability-status.available {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.availability-status.locked {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.availability-status.invitation {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.tier-button {
    display: block;
    text-align: center;
    background: var(--gradient-1);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tier-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.tier-button:hover::before {
    width: 300px;
    height: 300px;
}

.tier-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.tier-button.waitlist {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.tier-button.invitation {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.capacity-notice {
    max-width: 900px;
    margin: 40px auto 0;
    padding: 25px;
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
    border-radius: 8px;
}

.capacity-notice p {
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
}

.guarantee {
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 30px;
}

/* Forms */
.form-container {
    max-width: 450px;
    margin: 150px auto 50px;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-light);
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* Messages */
.error-message,
.success-message,
.info-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.info-message {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

/* User Info Page */
.user-dashboard {
    max-width: 1200px;
    margin: 150px auto 50px;
    padding: 0 40px;
}

.dashboard-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.dashboard-header h1 {
    margin-bottom: 10px;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.info-item label {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.info-item .value {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
}

.subscription-status {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(10px);
}

.subscription-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 10px;
}

.subscription-badge.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.subscription-badge.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Upload Container (for subscribe page when integrated) */
.upload-container {
    min-height: 100vh;
    padding-top: 100px;
}

.upload-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    margin-bottom: 40px;
}

.upload-header h2 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.back-btn {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    transition: gap 0.3s ease;
}

.back-btn:hover {
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    .hero {
        padding: 120px 20px 20px;
    }

    .transformation {
        flex-direction: column;
        gap: 20px;
    }

    .transform-box {
        width: 100%;
        max-width: 350px;
        height: 250px;
    }

    .arrow {
        transform: rotate(90deg);
        margin: 20px 0;
    }

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

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

    .form-container {
        margin: 120px 20px 50px;
    }

    .user-dashboard {
        padding: 0 20px;
    }
}

/* Google OAuth styles */
.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
    color: var(--text-light);
    font-size: 14px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(148, 163, 184, 0.2);
    transform: translateY(-50%);
}

.divider span {
    background: var(--bg-dark);
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    border: 1px solid #dadce0;
}

.google-signin-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.google-signin-btn svg {
    flex-shrink: 0;
}

/* Usage Statistics Styles */
.usage-statistics {
    margin-top: 30px;
    padding: 25px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.usage-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

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

.usage-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.usage-label {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.usage-numbers {
    margin-bottom: 15px;
}

.used-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.remaining-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success);
}

.total-count {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-left: 8px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-fill.warning {
    background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.progress-fill.danger {
    background: linear-gradient(90deg, var(--error), #f87171);
}

.progress-percentage {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    min-width: 40px;
}

.remaining-indicator {
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.remaining-indicator.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

.remaining-indicator.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.indicator-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--success);
}

.remaining-indicator.warning .indicator-text {
    color: var(--warning);
}

.remaining-indicator.danger .indicator-text {
    color: var(--error);
}

.reset-info {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

/* Warning and Alert Styles */
.low-credit-warning, .zero-credits-alert {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid;
}

.low-credit-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.zero-credits-alert {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.warning-icon, .alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.warning-content, .alert-content {
    flex: 1;
}

.warning-content h4, .alert-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.low-credit-warning h4 {
    color: var(--warning);
}

.zero-credits-alert h4 {
    color: var(--error);
}

.warning-content p, .alert-content p {
    margin: 0 0 10px 0;
    color: var(--text-light);
    font-size: 14px;
}

.upgrade-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.upgrade-link:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.upgrade-link.primary {
    background: var(--gradient-1);
    font-weight: 600;
    padding: 10px 20px;
}
