/* PlanMyValentine - Custom Styles */

/* ===== ROOT VARIABLES ===== */
:root {
    /* Light Mode Colors */
    --primary-pink: #ff1744;
    --secondary-pink: #ff4081;
    --light-pink: #ffebee;
    --dark-pink: #c51162;
    --gradient-start: #ff1744;
    --gradient-end: #ff4081;
    
    /* Text Colors */
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #95a5a6;
    
    /* Background */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-light: #fef5f7;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(255, 23, 68, 0.1);
    --shadow-md: 0 4px 16px rgba(255, 23, 68, 0.15);
    --shadow-lg: 0 8px 32px rgba(255, 23, 68, 0.2);
}

/* Dark Mode Variables */
[data-bs-theme="dark"] {
    --primary-pink: #ff4081;
    --secondary-pink: #ff80ab;
    --light-pink: #3a2733;
    --dark-pink: #f50057;
    --gradient-start: #ff4081;
    --gradient-end: #f50057;
    
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-light: #95a5a6;
    
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-light: #2a2d3a;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== BACKGROUND GRADIENT ===== */
.bg-gradient {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) !important;
}

.bg-light-pink {
    background: var(--light-pink) !important;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#themeToggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--primary-pink);
    color: var(--primary-pink);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

#themeToggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* ===== NAVBAR ===== */
.navbar {
    padding: 1.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-pink) !important;
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.hero-section h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
}

/* ===== CTA CARDS ===== */
.cta-card {
    display: block;
    padding: 2.5rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    height: 100%;
}

.cta-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-pink);
}

.cta-card .cta-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.cta-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.cta-card p {
    color: var(--text-secondary);
    margin: 0;
}

.cta-card-secondary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white !important;
}

.cta-card-secondary h3,
.cta-card-secondary p {
    color: white !important;
}

/* ===== FEATURE CARDS ===== */
.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 15px;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h5 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* ===== STEP CARDS ===== */
.step-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .step-card {
    background: var(--bg-secondary);
}

.step-card:hover {
    box-shadow: var(--shadow-md);
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

/* ===== FORM STYLES ===== */
.form-card {
    background: var(--bg-secondary);
    border-radius: 25px;
    overflow: hidden;
}

.form-control,
.form-select {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 0.2rem rgba(255, 23, 68, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border: 2px solid var(--primary-pink);
    color: var(--primary-pink);
    font-weight: 600;
    border-radius: 12px;
    padding: 0.875rem 2rem;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-pink);
    color: white;
    transform: translateY(-2px);
}

.plan-content p {
    line-height: 1.8;
    font-size: 1rem;
}

.plan-content strong {
    color: var(--primary-pink);
}

/* ===== AI GENERATED PLAN FORMATTING ===== */
.ai-generated-plan {
    line-height: 1.9;
    font-size: 1.05rem;
}

.ai-generated-plan h1,
.ai-generated-plan h2,
.ai-generated-plan h3 {
    color: var(--primary-pink);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.ai-generated-plan h1 {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

.ai-generated-plan h2 {
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--light-pink);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

.ai-generated-plan h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.ai-generated-plan p {
    margin-bottom: 1rem;
    line-height: 1.9;
}

.ai-generated-plan ul,
.ai-generated-plan ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.ai-generated-plan li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.ai-generated-plan strong {
    color: var(--primary-pink);
    font-weight: 600;
}

.ai-generated-plan em {
    color: var(--text-secondary);
    font-style: italic;
}

.ai-generated-plan blockquote {
    border-left: 4px solid var(--primary-pink);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.ai-generated-plan code {
    background: var(--light-pink);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* Day sections with emoji */
.ai-generated-plan > p:has(strong) {
    background: var(--light-pink);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-pink);
}

/* Day headers */
.ai-generated-plan > p > strong:first-child {
    display: block;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

/* Budget line */
.ai-generated-plan > p:last-of-type {
    font-size: 1.1rem;
}

/* Horizontal rule */
.ai-generated-plan hr {
    border: none;
    border-top: 2px dashed var(--light-pink);
    margin: 1.5rem 0;
}

/* Personalization section styling */
.personalization-section {
    border: 2px dashed var(--primary-pink);
    transition: all 0.3s ease;
}

.personalization-section:hover {
    border-style: solid;
    background: rgba(255, 23, 68, 0.08) !important;
}

.personalization-section textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== SHARE CARD ===== */
.share-card {
    background: var(--bg-secondary);
    border-radius: 16px;
}

/* ===== ACTION CARDS ===== */
.action-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.action-icon {
    font-size: 3rem;
}

/* ===== REACTIONS ===== */
.reactions-card {
    background: var(--bg-secondary);
    border-radius: 16px;
}

.reaction-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--light-pink);
    border-radius: 25px;
    font-size: 1.25rem;
}

.reaction-btn {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.reaction-btn:hover {
    transform: scale(1.05);
}

/* ===== LETTER CARD ===== */
.letter-card {
    background: #fffef7;
    border: 1px solid #e0e0e0;
    position: relative;
}

[data-bs-theme="dark"] .letter-card {
    background: var(--bg-secondary);
}

.letter-content {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-primary);
}

.letter-signature {
    font-family: 'Georgia', serif;
}

/* ===== INFO CARDS ===== */
.info-card {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.info-card i {
    font-size: 1.5rem;
}

/* ===== STATS ===== */
.stat-item {
    padding: 2rem;
}

.stat-item h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .footer {
    border-top-color: rgba(255, 255, 255, 0.05);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .cta-card {
        padding: 2rem 1rem;
    }
    
    .form-card {
        padding: 1.5rem;
    }
    
    .theme-toggle-container {
        top: 10px;
        right: 10px;
    }
    
    #themeToggle {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .footer,
    .theme-toggle-container,
    .share-card,
    .action-card,
    .btn,
    button {
        display: none !important;
    }
    
    .plan-content,
    .letter-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===== STICKY ELEMENTS ===== */
.sticky-top {
    position: sticky;
    top: 10px;
    z-index: 100;
}

/* ===== LOADING SPINNER ===== */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* ===== CITY CARDS ===== */
.city-card {
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid rgba(255, 23, 68, 0.08);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}
.city-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-pink);
}

/* ===== CITY MEGA DROPDOWN ===== */
.city-mega-dropdown {
    max-height: 420px;
    overflow-y: auto;
    min-width: 220px;
    padding: 0.5rem 0;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}
.city-mega-dropdown .dropdown-header {
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.6rem 1rem 0.3rem;
}
.city-mega-dropdown .dropdown-item {
    font-size: 0.88rem;
    padding: 0.35rem 1rem;
    transition: background 0.15s;
}
.city-mega-dropdown .dropdown-divider {
    margin: 0.4rem 0;
}

/* ===== CITY TABS ===== */
.city-tabs .nav-link {
    border-radius: 50px;
    padding: 0.55rem 1.5rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
    border: 1px solid transparent;
    transition: all 0.25s ease;
    margin: 0 0.25rem;
}
.city-tabs .nav-link:hover {
    background: var(--light-pink);
    color: var(--primary-pink);
}
.city-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    border-color: transparent;
}
.city-tabs .nav-link .badge {
    font-size: 0.68rem;
    padding: 0.2em 0.5em;
    border-radius: 50px;
}
.city-tabs .nav-link.active .badge {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
}
