@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800;900&display=swap');

:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(0, 0, 0, 0.08);
    --accent: #6366f1;
}

.dark {
    --bg-color: #050505;
    --text-color: #ffffff;
    --card-bg: rgba(18, 18, 18, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent: #8b5cf6;
}

body { 
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color); 
    color: var(--text-color); 
    margin: 0; 
    padding: 0; 
    overflow-x: hidden; 
    transition: background-color 0.3s ease, color 0.3s ease;
}

.glass-card { 
    background: var(--card-bg);
    backdrop-filter: blur(24px); 
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border); 
    border-radius: 2.5rem; 
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.dark .glass-card {
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.4);
}

.ai-glow { 
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

audio { 
    width: 100%;
    height: 40px; 
    border-radius: 12px;
    outline: none;
}

.dark audio { 
    filter: invert(1) hue-rotate(180deg) brightness(1.2);
}

.character-img { 
    width: 55px;
    height: 55px; 
    border-radius: 1.2rem; 
    border: 2px solid var(--accent); 
    object-fit: cover; 
    background: #111;
}

.preview-btn { 
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent); 
    border: 1px solid rgba(99, 102, 241, 0.2); 
    padding: 10px 18px; 
    border-radius: 14px; 
    font-size: 11px; 
    font-weight: 900; 
    display: flex;
    align-items: center; 
    gap: 8px; 
    transition: all 0.2s; 
    text-transform: uppercase; 
}

.preview-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

.sticky-footer { 
    position: fixed;
    bottom: 0; 
    left: 0; 
    right: 0; 
    background: linear-gradient(to top, var(--bg-color) 70%, transparent); 
    padding: 25px 20px; 
    z-index: 100;
    transition: background 0.3s ease;
}

.download-btn-small { 
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent); 
    width: 40px; 
    height: 40px; 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.2s;
    border: 1px solid rgba(99, 102, 241, 0.2); 
}

.download-btn-small:hover { 
    background: var(--accent);
    color: #fff; 
}

.toast { 
    position: fixed;
    top: 20px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 1000; 
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown { 
    from { transform: translate(-50%, -100%); opacity: 0; } 
    to { transform: translate(-50%, 0); opacity: 1; } 
}

.modal-overlay { 
    position: fixed;
    inset: 0; 
    background: rgba(0,0,0,0.6); 
    backdrop-filter: blur(8px); 
    z-index: 999; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}
