/* ============================================
   AI Girlfriend Dating Platform - Main Styles
   ============================================ */

:root {
    --primary: #e91e63;
    --primary-dark: #c2185b;
    --primary-light: #f48fb1;
    --secondary: #9c27b0;
    --accent: #ff6f00;
    --dark: #1a1a2e;
    --darker: #16213e;
    --darkest: #0f0f23;
    --card-bg: #1e1e3a;
    --card-hover: #2a2a4a;
    --text: #f0f0f0;
    --text-muted: #a0a0b8;
    --border: #2d2d50;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-dark: linear-gradient(135deg, var(--dark), var(--darker));
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
    --radius: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--darkest);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; }

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.text-center { text-align: center; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(233, 30, 99, 0.5);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-light);
    border: 2px solid var(--primary);
}
.btn-secondary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-lg { padding: 16px 40px; font-size: 18px; }
.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-block { width: 100%; }

.btn-premium {
    background: linear-gradient(135deg, #ff8a00, #e52e71);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 138, 0, 0.3);
}
.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 138, 0, 0.5);
    color: #fff;
}

/* ---- Navbar ---- */
.navbar {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar .logo { font-size: 24px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.navbar .nav-links { display: flex; gap: 24px; align-items: center; }
.navbar .nav-links a { color: var(--text-muted); font-weight: 500; }
.navbar .nav-links a:hover { color: var(--primary-light); }

/* ---- Hero ---- */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 50%, rgba(233, 30, 99, 0.15) 0%, transparent 60%),
                var(--darkest);
}
.hero::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(156, 39, 176, 0.2), transparent);
    top: -100px; right: -100px;
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}
.hero-content { position: relative; z-index: 1; max-width: 600px; }
.hero-content h1 { font-size: 52px; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero-content h1 span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-content p { font-size: 20px; color: var(--text-muted); margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image { position: relative; z-index: 1; flex: 1; display: flex; justify-content: center; }
.hero-image img { max-height: 500px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ---- Cards ---- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s ease;
}
.card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

/* ---- Character Cards ---- */
.character-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}
.character-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(233, 30, 99, 0.2);
}
.character-card .card-image {
    height: 300px;
    overflow: hidden;
    position: relative;
}
.character-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.character-card:hover .card-image img { transform: scale(1.05); }
.character-card .premium-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: linear-gradient(135deg, #ff8a00, #e52e71);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.character-card .card-body { padding: 20px; }
.character-card .card-body h3 { font-size: 22px; margin-bottom: 4px; }
.character-card .card-body .age { color: var(--text-muted); font-size: 14px; }
.character-card .card-body .tagline { color: var(--primary-light); font-size: 14px; margin: 8px 0; }
.character-card .card-body .traits { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.character-card .card-body .trait {
    background: rgba(233, 30, 99, 0.15);
    color: var(--primary-light);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

/* ---- Age Gate Modal ---- */
.age-gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.age-gate {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px;
    max-width: 520px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.age-gate .logo { font-size: 36px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; }
.age-gate h2 { font-size: 24px; margin-bottom: 16px; }
.age-gate p { color: var(--text-muted); margin-bottom: 24px; font-size: 14px; line-height: 1.7; }
.age-gate .disclaimer {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #ffcdd2;
    text-align: left;
}
.age-gate .buttons { display: flex; gap: 12px; justify-content: center; }
.age-gate .btn-exit {
    background: var(--card-bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 12px 32px;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}
.age-gate .btn-exit:hover { border-color: var(--danger); color: var(--danger); }

/* ---- Forms ---- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text-muted); font-size: 14px; }
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--darkest);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 16px;
    transition: border-color 0.3s;
}
.form-input:focus { outline: none; border-color: var(--primary); }
.form-input::placeholder { color: var(--text-muted); }
select.form-input { appearance: none; cursor: pointer; }

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.auth-box {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
}
.auth-box .logo { text-align: center; font-size: 32px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; }
.auth-box h2 { text-align: center; margin-bottom: 24px; }
.auth-box .switch-link { text-align: center; margin-top: 20px; color: var(--text-muted); }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error { background: rgba(244, 67, 54, 0.15); border: 1px solid rgba(244, 67, 54, 0.3); color: #ffcdd2; }
.alert-success { background: rgba(76, 175, 80, 0.15); border: 1px solid rgba(76, 175, 80, 0.3); color: #c8e6c9; }

/* ---- Chat ---- */
.chat-container {
    display: flex;
    height: calc(100vh - 70px);
    overflow: hidden;
}
.chat-sidebar {
    width: 300px;
    background: var(--dark);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    flex-shrink: 0;
}
.chat-sidebar .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 18px;
}
.chat-sidebar .conversation-item {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.3s;
}
.chat-sidebar .conversation-item:hover,
.chat-sidebar .conversation-item.active { background: var(--card-bg); }
.chat-sidebar .conversation-item img {
    width: 48px; height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-sidebar .conversation-item .conv-info h4 { font-size: 15px; }
.chat-sidebar .conversation-item .conv-info p { font-size: 13px; color: var(--text-muted); }

.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
}
.chat-header img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-header .status { width: 10px; height: 10px; background: var(--success); border-radius: 50%; display: inline-block; margin-left: 4px; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.message {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.message.user {
    background: var(--gradient);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.message.assistant {
    background: var(--card-bg);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.message .time { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.message.assistant .time { color: var(--text-muted); }

.chat-input-area {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--dark);
    display: flex;
    gap: 12px;
}
.chat-input-area input {
    flex: 1;
    padding: 14px 20px;
    background: var(--darkest);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text);
    font-size: 15px;
}
.chat-input-area input:focus { outline: none; border-color: var(--primary); }
.chat-input-area button {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-input-area button:hover { transform: scale(1.1); }

.message-limit-bar {
    padding: 8px 24px;
    background: rgba(255, 152, 0, 0.1);
    border-top: 1px solid rgba(255, 152, 0, 0.3);
    text-align: center;
    font-size: 13px;
    color: var(--warning);
}
.message-limit-bar a { color: var(--primary-light); font-weight: 600; }

.typing-indicator {
    display: none;
    align-self: flex-start;
    padding: 12px 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
}
.typing-indicator span {
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* ---- Pricing ---- */
.pricing-section { padding: 80px 0; }
.pricing-section h2 { text-align: center; font-size: 36px; margin-bottom: 12px; }
.pricing-section .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 48px; }

.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    text-align: center;
    transition: all 0.3s;
}
.pricing-card.featured {
    border-color: var(--primary);
    position: relative;
    transform: scale(1.05);
    box-shadow: 0 8px 40px rgba(233, 30, 99, 0.2);
}
.pricing-card.featured::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--gradient);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.pricing-card h3 { font-size: 24px; margin-bottom: 8px; }
.pricing-card .price { font-size: 48px; font-weight: 800; margin: 20px 0; }
.pricing-card .price span { font-size: 18px; color: var(--text-muted); font-weight: 400; }
.pricing-card ul { list-style: none; margin: 24px 0; text-align: left; }
.pricing-card ul li { padding: 8px 0; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.pricing-card ul li::before { content: '\2713'; color: var(--success); font-weight: 700; }
.pricing-card ul li.disabled { opacity: 0.4; }
.pricing-card ul li.disabled::before { content: '\2717'; color: var(--danger); }

/* ---- Features ---- */
.features-section { padding: 80px 0; }
.feature-card { text-align: center; padding: 32px; }
.feature-card .icon { font-size: 48px; margin-bottom: 16px; }
.feature-card h3 { font-size: 20px; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 15px; }

/* ---- Dashboard ---- */
.dashboard { padding: 40px 0; }
.dashboard h1 { margin-bottom: 32px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.stat-card .value { font-size: 36px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card .label { color: var(--text-muted); margin-top: 4px; }

/* ---- Footer ---- */
.footer {
    background: var(--dark);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 80px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { margin-bottom: 16px; color: var(--text); }
.footer-col a { display: block; color: var(--text-muted); margin-bottom: 8px; font-size: 14px; }
.footer-col a:hover { color: var(--primary-light); }
.footer-col p { color: var(--text-muted); font-size: 14px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; padding: 60px 0; min-height: auto; }
    .hero-content h1 { font-size: 36px; }
    .hero-actions { justify-content: center; }
    .hero-image { margin-top: 40px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .chat-sidebar { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .pricing-card.featured { transform: scale(1); }
    .navbar .nav-links { gap: 12px; }
}
