/* Global Variables & Theming */
:root {
    /* Premium Birthday Palette */
    --primary-pink: #FF758C;
    --primary-gold: #FFD700;
    --secondary-rose: #FF7EB3;
    --vibrant-gradient: linear-gradient(135deg, #FF758C 0%, #FF7EB3 100%);
    --gold-gradient: linear-gradient(135deg, #F9A825 0%, #FFD700 100%);
    
    /* Light Theme Defaults */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --card-shadow: 0 15px 35px rgba(255, 117, 140, 0.15);
    --text-color: #2D3436;
    --text-light: #636E72;
    --bg-color: #FFF5F7;
    --bg-gradient: linear-gradient(135deg, #FFF5F7 0%, #FFE4E9 100%);
    
    /* Buttons */
    --btn-primary: linear-gradient(to right, #FF758C 0%, #FF7EB3 51%, #FF758C 100%);
    --btn-secondary: #00B894;
    --btn-accent: #6C5CE7;
}

[data-theme="dark"] {
    --glass-bg: rgba(45, 52, 54, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #FDFDFD;
    --text-light: #B2BEC3;
    --bg-color: #2D3436;
    --bg-gradient: linear-gradient(135deg, #2D3436 0%, #000000 100%);
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s, color 0.3s;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-pink);
    letter-spacing: 1px;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-pink);
}

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
}

/* Main Content */
main {
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.page-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(to right, #FF758C, #FF7EB3, #F9A825);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.5);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s;
}

[data-theme="dark"] input, 
[data-theme="dark"] select, 
[data-theme="dark"] textarea {
    background: rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.1);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 4px rgba(255, 117, 140, 0.2);
    background: var(--glass-bg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--btn-primary);
    background-size: 200% auto;
    color: white;
    width: 100%;
    box-shadow: 0 8px 20px rgba(255, 117, 140, 0.3);
}

.btn-primary:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 117, 140, 0.4);
}

.btn-secondary { background: var(--btn-secondary); color: white; }
.btn-accent { background: var(--btn-accent); color: white; }
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-pink);
    color: var(--primary-pink);
}

.btn-outline:hover {
    background: var(--primary-pink);
    color: white;
}

/* Output Area */
.output-area {
    margin-top: 1rem;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.output-area.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.result-box {
    position: relative;
    padding: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

#output {
    width: 100%;
    min-height: 180px;
    border: none;
    background: transparent;
    padding: 1.5rem;
    resize: none;
    font-size: 1.25rem;
    line-height: 1.6;
    font-style: italic;
    color: var(--text-color);
}

.char-count {
    position: absolute;
    bottom: 12px;
    right: 20px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Loading Spinner */
.loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 24px;
}

[data-theme="dark"] .loading-overlay { background: rgba(45, 52, 54, 0.95); }

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #F3F3F3;
    border-top: 5px solid var(--primary-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* History Section */
.history-section {
    margin-top: 3rem;
}

.history-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 16px;
    margin-bottom: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.history-item:hover {
    transform: translateX(5px);
    background: white;
    border-color: var(--primary-pink);
}

[data-theme="dark"] .history-item:hover { background: #353b48; }

.history-text {
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 85%;
}

/* Info Sections */
.section-card { margin-top: 2rem; }
.section-title {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-pink);
}

.info-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.info-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
}

.info-section h3 {
    color: var(--primary-pink);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.last-updated {
    font-size: 0.8rem;
    color: var(--text-light);
    opacity: 0.6;
    margin-bottom: 2rem;
    font-style: italic;
}

.info-text ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.info-text ul li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

/* FAQ */
.faq-item {
    margin-bottom: 0.8rem;
    border-radius: 12px;
    background: rgba(0,0,0,0.03);
    overflow: hidden;
}

[data-theme="dark"] .faq-item { background: rgba(255,255,255,0.03); }

summary {
    padding: 1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary::after { content: '+'; font-size: 1.2rem; }
details[open] summary::after { content: '−'; }

.faq-item p {
    padding: 0 1rem 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.4);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .feature-card {
    background: rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--primary-pink);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    color: var(--primary-pink);
    margin-bottom: 0.8rem;
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.seo-footer-p {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-light);
}

.seo-footer-p p { margin-bottom: 0; }

/* Footer */
footer {
    background: var(--glass-bg);
    padding: 4rem 2rem 2rem;
    margin-top: 5rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-col h3 { color: var(--primary-pink); margin-bottom: 1.2rem; font-size: 1.1rem; }
.footer-col p { font-size: 0.85rem; line-height: 1.6; color: var(--text-light); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--text-light); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary-pink); }

.affiliate-disclosure {
    margin-top: 3rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    opacity: 0.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Toast */
.toast-container { position: fixed; bottom: 30px; right: 30px; z-index: 1000; }
.toast {
    background: #2D3436;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-top: 10px;
    animation: slideLeft 0.3s ease;
}

@keyframes slideLeft {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Hamburger for Mobile */
.hamburger { display: none; }

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        flex-direction: column;
        padding: 1.5rem;
        border-top: 1px solid var(--glass-border);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 99;
    }
    
    .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
    .bar { width: 25px; height: 3px; background: var(--primary-pink); border-radius: 3px; }
    .page-title { font-size: 2.2rem; }
    .glass-card { padding: 1.5rem; }
}

/* Gift Page Specific Styles */
.gift-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.gift-tab {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.gift-tab.active {
    background: var(--primary-pink);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 117, 140, 0.4);
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.gift-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gift-card:hover { transform: translateY(-10px); }

.gift-emoji { font-size: 3.5rem; margin-bottom: 1rem; display: block; }
.gift-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.gift-desc { font-size: 0.9rem; color: var(--text-light); margin-bottom: 1.5rem; }

.affiliate-btn {
    background: #FF9900;
    color: #111;
    padding: 0.8rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    display: block;
    transition: opacity 0.2s;
}

.affiliate-btn:hover { opacity: 0.9; }