/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --accent: #d4ff00;
    --dark: #1a1a2e;
    --darker: #0f0f1a;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --white: #ffffff;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-light);
    color: var(--dark);
    line-height: 1.6;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 16px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 24px;
    color: var(--primary-light);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

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

.nav-links a {
    color: var(--gray-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

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

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

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, #2d1b4e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-title .highlight {
    color: var(--accent);
    font-style: italic;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--gray-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* AI Chat Interface */
.ai-chat-container {
    max-width: 650px;
    margin: 0 auto 24px;
}

.ai-chat-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.ai-chat-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}

.ai-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    flex-shrink: 0;
}

.ai-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 16px;
    font-family: inherit;
    resize: none;
    outline: none;
    min-height: 44px;
    padding: 10px 0;
}

.ai-input::placeholder {
    color: var(--gray);
}

.ai-send-btn {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.ai-suggestions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
}

.suggestion-label {
    color: var(--gray);
    font-size: 13px;
}

.suggestion-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border-color: var(--primary);
}

.hero-guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray);
    font-size: 14px;
    margin-top: 24px;
}

.hero-guarantee svg {
    color: var(--accent);
}

/* Features Cards Section */
.features-cards {
    padding: 60px 0;
    background: var(--bg-light);
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-card {
    border-radius: 20px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.card-purple {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.card-dark {
    background: var(--darker);
    color: var(--white);
}

.card-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-content p {
    font-size: 14px;
    opacity: 0.85;
    max-width: 280px;
    margin-bottom: 16px;
}

.card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-label {
    font-size: 14px;
    opacity: 0.7;
}

.price-old {
    font-size: 16px;
    text-decoration: line-through;
    opacity: 0.5;
}

.price-new {
    font-size: 24px;
    font-weight: 700;
}

.card-icon {
    position: absolute;
    right: 24px;
    bottom: 24px;
}

.percent-icon {
    font-size: 64px;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.9;
}

.card-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    opacity: 0.7;
}

/* Search Box in Card */
.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 16px;
    color: var(--white);
    font-size: 14px;
    outline: none;
}

.search-input::placeholder {
    color: var(--gray);
}

.search-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Templates Section */
.templates-section {
    padding: 80px 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-badge {
    display: inline-block;
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

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

.template-card {
    background: var(--bg-light);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

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

.template-preview {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-icon {
    font-size: 48px;
}

.gradient-1 { background: linear-gradient(135deg, #ff6b6b, #feca57); }
.gradient-2 { background: linear-gradient(135deg, #5f27cd, #341f97); }
.gradient-3 { background: linear-gradient(135deg, #00d2d3, #54a0ff); }
.gradient-4 { background: linear-gradient(135deg, #ff9ff3, #f368e0); }
.gradient-5 { background: linear-gradient(135deg, #1dd1a1, #10ac84); }
.gradient-6 { background: linear-gradient(135deg, #ff9f43, #ee5a24); }

.template-info {
    padding: 20px;
}

.template-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.template-info p {
    font-size: 14px;
    color: var(--gray);
}

/* Trust Section */
.trust-section {
    padding: 80px 0;
    background: var(--bg-light);
    text-align: center;
}

.trust-section h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 48px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 16px;
    color: var(--gray);
}

/* Footer */
.footer {
    background: var(--darker);
    color: var(--white);
    padding: 60px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--gray);
    margin-top: 12px;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-column a {
    color: var(--gray);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--white);
}

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

.footer-bottom p {
    color: var(--gray);
    font-size: 14px;
}

/* AI Modal */
.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.ai-modal.active {
    display: flex;
}

.ai-modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

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

.ai-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: var(--dark);
}

.ai-modal-header .ai-avatar {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.modal-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--dark);
}

.ai-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.7;
    color: var(--dark);
}

.ai-modal-body .loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray);
}

.ai-modal-body .loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Token Display */
.token-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.token-display svg {
    color: var(--accent);
}

/* Pricing Section */
.pricing-section {
    padding: 80px 0;
    background: var(--white);
}

.section-subtitle {
    color: var(--gray);
    font-size: 16px;
    margin-top: 12px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.pricing-card {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 28px 24px;
    position: relative;
    transition: all 0.3s;
    border: 2px solid transparent;
}

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

.pricing-card.popular {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    transform: scale(1.05);
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-8px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--dark);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pricing-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-amount {
    font-size: 36px;
    font-weight: 700;
}

.price-period {
    font-size: 14px;
    opacity: 0.7;
}

.pricing-tokens {
    margin: 20px 0;
    padding: 16px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 12px;
    text-align: center;
}

.pricing-card.popular .pricing-tokens {
    background: rgba(255, 255, 255, 0.15);
}

.token-amount {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.pricing-card.popular .token-amount {
    color: var(--accent);
}

.token-label {
    font-size: 13px;
    opacity: 0.7;
}

.pricing-features {
    list-style: none;
    margin: 20px 0;
}

.pricing-features li {
    padding: 8px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li::before {
    content: '✓';
    color: var(--primary);
    font-weight: 700;
}

.pricing-card.popular .pricing-features li::before {
    color: var(--accent);
}

.btn-pricing {
    width: 100%;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
}

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

.btn-pricing.btn-current {
    background: var(--gray-light);
    border-color: var(--gray-light);
    color: var(--white);
    cursor: default;
}

.btn-pricing.btn-current:hover {
    background: var(--gray-light);
}

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

.btn-pricing.btn-popular:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--dark);
}

/* Payment Modal */
.payment-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 24px;
}

.payment-modal.active {
    display: flex;
}

.payment-modal-content {
    background: var(--white);
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    padding: 32px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.payment-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: all 0.2s;
}

.payment-close:hover {
    background: var(--dark);
    color: var(--white);
}

.payment-header {
    text-align: center;
    margin-bottom: 28px;
}

.payment-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.payment-header h2 span {
    color: var(--primary);
}

.payment-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.payment-amount {
    font-size: 48px;
    font-weight: 800;
    color: var(--dark);
}

.payment-period {
    font-size: 18px;
    color: var(--gray);
}

.payment-tokens {
    color: var(--gray);
    font-size: 15px;
}

.payment-tokens span {
    font-weight: 700;
    color: var(--primary);
}

.payment-methods {
    margin-bottom: 24px;
}

.payment-methods h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    text-align: center;
}

.payment-btn {
    width: 100%;
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.payment-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.payment-stripe {
    background: #635bff;
    color: white;
}

.payment-stripe:hover:not(:disabled) {
    background: #5046e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 91, 255, 0.4);
}

.payment-paypal {
    background: #0070ba;
    color: white;
}

.payment-paypal:hover:not(:disabled) {
    background: #005ea6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 112, 186, 0.4);
}

.payment-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray);
}

.payment-security svg {
    color: #10b981;
}

.payment-btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* Guest Actions */
.guest-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* User Menu */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
    overflow: hidden;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.dropdown-item:hover {
    background: var(--bg-light);
}

.dropdown-item svg {
    color: var(--gray);
}

.dropdown-item-danger {
    color: #ef4444;
}

.dropdown-item-danger svg {
    color: #ef4444;
}

.dropdown-divider {
    height: 1px;
    background: var(--bg-light);
    margin: 4px 0;
}

/* Auth Modals */
.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 24px;
}

.auth-modal.active {
    display: flex;
}

.auth-modal-content {
    background: var(--white);
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    padding: 40px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.auth-modal-large {
    max-width: 500px;
}

.auth-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: all 0.2s;
}

.auth-close:hover {
    background: var(--dark);
    color: var(--white);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white);
    margin: 0 auto 20px;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray);
    font-size: 15px;
}

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

.auth-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--bg-light);
    border-radius: 12px;
    font-size: 15px;
    color: var(--dark);
    transition: all 0.2s;
    background: var(--white);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.auth-form input::placeholder {
    color: var(--gray-light);
}

.auth-error {
    color: #ef4444;
    font-size: 13px;
    margin-bottom: 16px;
    min-height: 20px;
}

.btn-auth {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--gray);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bg-light);
}

.auth-divider span {
    padding: 0 16px;
}

.social-buttons {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--white);
    border: 2px solid var(--bg-light);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s;
}

.social-btn:hover {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--gray);
}

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

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

/* Account Modal */
.account-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
    margin: 0 auto 16px;
}

.account-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.account-stat {
    flex: 1;
    text-align: center;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
}

.account-stat .stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.account-stat .stat-label {
    font-size: 12px;
    color: var(--gray);
}

.account-actions {
    text-align: center;
}

/* History Modal */
.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray);
}

.history-empty svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.history-empty p {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.history-empty span {
    font-size: 14px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    transition: all 0.15s;
}

.history-item:hover {
    background: var(--bg-light);
}

.history-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.history-info {
    flex: 1;
}

.history-title {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.history-date {
    font-size: 13px;
    color: var(--gray);
}

/* Settings Modal */
.settings-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--bg-light);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
}

.settings-section .form-group {
    margin-bottom: 16px;
}

.settings-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 8px;
}

.settings-section input[type="text"],
.settings-section input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--bg-light);
    border-radius: 10px;
    font-size: 14px;
    color: var(--dark);
}

.settings-section input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

/* Fix btn-secondary visibility in light modals */
.settings-section .btn-secondary {
    background: var(--bg-light);
    color: var(--dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.settings-section .btn-secondary:hover {
    background: #e5e5e5;
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-light);
    border-radius: 26px;
    transition: all 0.3s;
}

.toggle-slider::before {
    position: absolute;
    content: '';
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

.settings-danger {
    background: rgba(239, 68, 68, 0.05);
    margin: 20px -40px -40px;
    padding: 24px 40px 40px;
    border-radius: 0 0 24px 24px;
}

.settings-danger h3 {
    color: #ef4444;
}

.settings-danger p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 16px;
}

.btn-danger {
    background: #ef4444;
    border: none;
    color: var(--white);
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Settings Modal Enhanced */
.settings-modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bg-light);
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-light);
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
}

.settings-tab:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
}

.settings-tab.active {
    background: var(--primary);
    color: var(--white);
}

.settings-tab svg {
    width: 16px;
    height: 16px;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

.settings-desc {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 16px;
}

.settings-hint {
    color: var(--gray-light);
    font-size: 12px;
    margin-top: 8px;
}

.settings-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--bg-light);
    border-radius: 10px;
    font-size: 14px;
    color: var(--dark);
    background: var(--white);
    cursor: pointer;
}

.settings-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Promo Code Input */
.promo-code-input {
    display: flex;
    gap: 12px;
}

.promo-code-input input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--bg-light);
    border-radius: 12px;
    font-size: 15px;
    color: var(--dark);
    font-family: monospace;
    letter-spacing: 1px;
}

.promo-code-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.promo-code-input .btn {
    padding: 14px 28px;
    white-space: nowrap;
}

.promo-result {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.promo-result.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.promo-result.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Account Info */
.account-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--bg-light);
}

.account-info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--gray);
    font-size: 14px;
}

.info-value {
    font-weight: 600;
    color: var(--dark);
}

.info-plan {
    padding: 4px 12px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 20px;
    color: var(--primary);
    font-size: 13px;
}

/* Session Item */
.session-item {
    padding: 14px;
    background: var(--bg-light);
    border-radius: 10px;
}

.session-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-device {
    font-weight: 600;
    color: var(--dark);
}

.session-status {
    font-size: 12px;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 6px;
}

.session-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

/* Settings Links */
.settings-link {
    display: block;
    padding: 12px 0;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--bg-light);
    transition: all 0.2s;
}

.settings-link:last-child {
    border-bottom: none;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pricing-card.popular {
        transform: scale(1);
    }

    .pricing-card.popular:hover {
        transform: translateY(-8px);
    }
}

@media (max-width: 968px) {
    .nav-links {
        display: none;
    }

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

    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        flex-direction: column;
        gap: 48px;
    }

    .footer-links {
        gap: 48px;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .ai-chat-box {
        flex-direction: column;
        align-items: stretch;
    }

    .ai-avatar {
        display: none;
    }

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

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .section-header h2,
    .trust-section h2 {
        font-size: 28px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .token-display {
        padding: 6px 10px;
        font-size: 12px;
    }

    .user-name {
        display: none;
    }

    .user-menu-btn {
        padding: 6px;
    }

    .auth-modal-content {
        padding: 28px;
    }

    .social-buttons {
        flex-direction: column;
    }

    .account-stats {
        flex-direction: column;
        gap: 10px;
    }

    .settings-danger {
        margin: 20px -28px -28px;
        padding: 20px 28px 28px;
    }

    .guest-actions {
        gap: 8px;
    }

    .guest-actions .btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .settings-tabs {
        gap: 6px;
    }

    .settings-tab {
        padding: 8px 12px;
        font-size: 12px;
    }

    .settings-tab svg {
        display: none;
    }

    .promo-code-input {
        flex-direction: column;
    }

    .promo-code-input .btn {
        width: 100%;
    }

    .settings-modal-content {
        max-height: 85vh;
    }
}

/* ========== MODES POPUP ========== */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header-row h3 {
    margin-bottom: 0;
}

.section-header-row .btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Make buttons more visible in modals */
.settings-modal-content .btn-primary {
    background: var(--primary);
    color: var(--white);
}

.promo-code-input .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

.modes-list {
    min-height: 60px;
}

.modes-empty {
    color: var(--gray);
    font-size: 14px;
    padding: 16px;
    text-align: center;
    background: var(--bg-light);
    border-radius: 12px;
}

/* User Mode Items in Settings */
.user-mode-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 10px;
}

.user-mode-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.user-mode-name {
    flex: 1;
    font-weight: 600;
    color: var(--dark);
}

.user-mode-actions {
    display: flex;
    gap: 8px;
}

.user-mode-actions .btn {
    padding: 8px 14px;
}

.mode-remove-btn {
    padding: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.mode-remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Modes Popup Modal */
.modes-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    padding: 24px;
}

.modes-popup.active {
    display: flex;
}

.modes-popup-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    padding: 0;
    animation: modalSlideIn 0.25s ease;
    overflow: hidden;
}

.modes-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--bg-light);
}

.modes-popup-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.modes-popup-close {
    width: 32px;
    height: 32px;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: all 0.2s;
}

.modes-popup-close:hover {
    background: var(--dark);
    color: var(--white);
}

.modes-popup-list {
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}

/* Mode Item in Popup */
.mode-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.mode-item:last-child {
    margin-bottom: 0;
}

.mode-item:hover {
    background: var(--bg-light);
}

.mode-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.mode-info {
    flex: 1;
}

.mode-name {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.mode-desc {
    font-size: 13px;
    color: var(--gray);
}

.mode-add-btn {
    white-space: nowrap;
}

.mode-add-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

/* "Added" state - green color */
.mode-add-btn.btn-secondary:disabled {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

/* "Coming Soon" state - gray color */
.modes-popup-list .mode-item .mode-add-btn[disabled]:not(.btn-secondary) {
    background: var(--bg-light) !important;
    color: var(--gray) !important;
}

/* Background Picker Modal */
.bg-picker-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 24px;
}

.bg-picker-modal.active {
    display: flex;
}

.bg-picker-content {
    background: var(--white);
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    padding: 0;
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

.bg-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--bg-light);
}

.bg-picker-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.bg-picker-close {
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: all 0.2s;
}

.bg-picker-close:hover {
    background: var(--dark);
    color: var(--white);
}

.bg-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 24px;
}

.bg-option {
    aspect-ratio: 1;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    border: 3px solid transparent;
    overflow: hidden;
}

.bg-option:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.bg-option.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}

.bg-option.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--white);
    font-weight: bold;
}

.bg-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

/* Responsive Modes */
@media (max-width: 640px) {
    .modes-popup-content,
    .bg-picker-content {
        max-width: 100%;
    }

    .bg-picker-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-mode-item {
        flex-wrap: wrap;
    }

    .user-mode-actions {
        width: 100%;
        margin-top: 10px;
    }

    .user-mode-actions .btn {
        flex: 1;
    }
}

/* ========== CREATE MENU ========== */
.create-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.create-btn {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.create-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.create-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
    overflow: hidden;
}

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

/* ========== PROJECT MODAL ========== */
.project-modal-content {
    max-width: 480px;
}

.project-modal-content textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--bg-light);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--dark);
    resize: vertical;
    min-height: 80px;
}

.project-modal-content textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.icon-upload-area {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 14px;
}

.icon-preview {
    width: 80px;
    height: 80px;
    background: var(--white);
    border: 2px dashed var(--gray-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    flex-shrink: 0;
    overflow: hidden;
}

.icon-preview.has-icon {
    border-style: solid;
    border-color: var(--primary);
}

.icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-preview svg {
    color: inherit;
}

.icon-upload-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.icon-upload-options .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

/* Fix button visibility in modals */
.icon-upload-options .btn-secondary,
.auth-modal .btn-secondary,
.user-mode-actions .btn-secondary,
.project-actions .btn-secondary {
    background: var(--bg-light);
    color: var(--dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.icon-upload-options .btn-secondary:hover,
.auth-modal .btn-secondary:hover,
.user-mode-actions .btn-secondary:hover,
.project-actions .btn-secondary:hover {
    background: #e5e5e5;
    border-color: rgba(0, 0, 0, 0.15);
}

/* Make Upload File button stand out more */
#upload-icon-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: var(--white);
    border: none;
}

#upload-icon-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.project-error {
    color: #ef4444;
    font-size: 13px;
    margin-bottom: 16px;
    min-height: 20px;
}

/* ========== AI ICON GENERATOR ========== */
.ai-icon-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 24px;
}

.ai-icon-modal.active {
    display: flex;
}

.ai-icon-modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    animation: modalSlideIn 0.25s ease;
}

.ai-icon-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--bg-light);
}

.ai-icon-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.ai-icon-close {
    width: 32px;
    height: 32px;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: all 0.2s;
}

.ai-icon-close:hover {
    background: var(--dark);
    color: var(--white);
}

.ai-icon-body {
    padding: 24px;
}

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

.ai-icon-body label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.ai-icon-body input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--bg-light);
    border-radius: 10px;
    font-size: 14px;
    color: var(--dark);
}

.ai-icon-body input:focus {
    outline: none;
    border-color: var(--primary);
}

.ai-icon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ai-icon-option {
    aspect-ratio: 1;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid transparent;
}

.ai-icon-option:hover {
    transform: scale(1.08);
}

.ai-icon-option.selected {
    border-color: var(--dark);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

/* ========== PROJECTS LIST ========== */
.projects-list {
    max-height: 400px;
    overflow-y: auto;
}

.projects-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray);
}

.projects-empty svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.projects-empty p {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.projects-empty span {
    font-size: 14px;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
    transition: all 0.15s;
    margin-bottom: 8px;
}

.project-item:hover {
    background: var(--bg-light);
}

.project-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
    overflow: hidden;
}

.project-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    flex: 1;
    min-width: 0;
}

.project-title {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-desc {
    font-size: 13px;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.project-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.project-delete-btn {
    padding: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

.project-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2) !important;
}

/* ========== PROJECTS COUNTER ========== */
.projects-counter {
    background: var(--bg-light);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.counter-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.counter-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 4px;
}

.counter-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--dark);
}

.counter-text strong {
    color: var(--primary);
    font-size: 16px;
}

.counter-plan {
    font-size: 12px;
    padding: 4px 12px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-weight: 600;
}

/* Responsive Projects */
@media (max-width: 640px) {
    .create-btn {
        width: 36px;
        height: 36px;
    }

    .icon-upload-area {
        flex-direction: column;
        text-align: center;
    }

    .icon-upload-options {
        width: 100%;
    }

    .icon-upload-options .btn {
        width: 100%;
    }

    .ai-icon-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .project-item {
        flex-wrap: wrap;
    }

    .project-actions {
        width: 100%;
        margin-top: 10px;
    }

    .project-actions .btn {
        flex: 1;
    }
}

/* ========== STUFF MODAL ========== */
.stuff-modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.stuff-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bg-light);
}

.stuff-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-light);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
}

.stuff-tab:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
}

.stuff-tab.active {
    background: var(--primary);
    color: var(--white);
}

.stuff-tab svg {
    width: 16px;
    height: 16px;
}

.stuff-tab-content {
    display: none;
}

.stuff-tab-content.active {
    display: block;
}

/* ========== FOLDER ITEMS ========== */
.folders-list {
    max-height: 400px;
    overflow-y: auto;
}

.folders-empty,
.notes-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray);
}

.folders-empty svg,
.notes-empty svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.folders-empty p,
.notes-empty p {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.folders-empty span,
.notes-empty span {
    font-size: 14px;
}

.folder-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
    transition: all 0.15s;
    margin-bottom: 8px;
}

.folder-item:hover {
    background: var(--bg-light);
}

.folder-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.folder-info {
    flex: 1;
    min-width: 0;
}

.folder-title {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.folder-count {
    font-size: 13px;
    color: var(--gray);
}

.folder-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.folder-delete-btn {
    padding: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

.folder-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2) !important;
}

/* Folder Header (inside folder view) */
.folder-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--bg-light);
}

.folder-header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.folder-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Project folder badge */
.project-folder-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

/* Move button */
.project-move-btn {
    padding: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    color: #d97706 !important;
}

.project-move-btn:hover {
    background: rgba(245, 158, 11, 0.25) !important;
}

/* Remove from folder button */
.project-remove-folder-btn {
    padding: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

.project-remove-folder-btn:hover {
    background: rgba(239, 68, 68, 0.2) !important;
}

/* ========== MOVE TO FOLDER MODAL ========== */
.folder-select-list {
    max-height: 300px;
    overflow-y: auto;
}

.folder-select-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 8px;
    border: 2px solid var(--bg-light);
}

.folder-select-option:hover {
    background: var(--bg-light);
    border-color: var(--primary);
}

.folder-select-option svg {
    color: var(--gray);
}

.folder-select-option span {
    font-weight: 500;
    color: var(--dark);
}

/* Folder error */
.folder-error {
    color: #ef4444;
    font-size: 13px;
    margin-bottom: 16px;
    min-height: 20px;
}

/* Responsive Stuff */
@media (max-width: 640px) {
    .stuff-tabs {
        flex-wrap: wrap;
    }

    .stuff-tab {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
    }

    .stuff-tab svg {
        display: none;
    }

    .folder-item {
        flex-wrap: wrap;
    }

    .folder-actions {
        width: 100%;
        margin-top: 10px;
    }

    .folder-actions .btn {
        flex: 1;
    }
}
