/* === GLOBAL OVERRIDES === */
html, body { background: transparent !important; }

/* === FONT === */
@font-face {
    font-family: 'Soul Gaze';
    src: url('{{ url_for('static', filename='fonts/SoulGaze.ttf') }}') format('truetype');
}
body {
    font-family: 'Soul Gaze', Arial, sans-serif;
    margin: 0; padding: 0;
    color: #2B2B2B;
    line-height: 1.6;
    font-size: 0.97rem;
    position: relative; z-index: 1;
}

/* === SIDE PANELS (Dark Frosted Glass) === */
body::before, body::after {
    content: "";
    position: fixed; top: 0; bottom: 0; width: calc((100% - 1000px) / 2);
    background: linear-gradient(180deg, rgba(34,60,40,0.8), rgba(15,25,20,0.95));
    backdrop-filter: blur(8px) brightness(0.9);
    opacity: 0.85; z-index: 0; pointer-events: none;
}
body::before { left: 0; }
body::after  { right: 0; }

/* === PROFILE & USER MENU === */
.profile-toggle { display: flex; align-items: center; cursor: pointer; text-decoration: none !important; }
.profile-icon {
    width: 34px; height: 34px; border-radius: 50%;
    border: 2px solid #81C784; margin-right: 6px;
    object-fit: cover; background: #1B1B1B;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
.profile-toggle:hover .profile-icon { transform: scale(1.05); box-shadow: 0 3px 8px rgba(0,0,0,0.6); }
.welcome-text { font-size: 1rem; color: #FFF !important; font-weight: 600; }

/* === USER NAV INSIDE NAVBAR === */
.user-nav { display: flex; align-items: center; }
.user-nav .nav-link { color: #81C784 !important; font-weight: 600; padding: 0 10px; }
.user-nav .nav-link:hover { color: #A5D6A7 !important; }

/* === CONTENT WRAPPER (Single Width Control) === */
.content-wrapper {
    background: #FFFFFF;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    border-radius: 12px;
    max-width: 1000px;       /* ✅ single panel width */
    margin: 40px auto;
    padding: 40px 35px;
    position: relative;
    z-index: 3;
    line-height: 1.65;
    overflow-x: hidden;
    word-wrap: break-word;
}

/* === Disable Bootstrap Container Width (Fix Double Panel) === */
.content-wrapper {
    background: #FFFFFF;
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px 35px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    position: relative;
    z-index: 3;
    overflow-x: hidden;
    word-wrap: break-word;
}

/* === HERO SECTIONS === */
.hero, .features-hero, .about-hero, .insights-hero {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    padding: 100px 0; text-align: center; color: white;
    border-radius: 0 0 30px 30px;
    z-index: 2; position: relative;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}
.hero-title, .features-hero h1, .about-hero h1, .insights-hero h1 {
    font-size: 1.8rem !important; font-weight: 400;
}
.hero-subtitle, .features-hero p.lead, .about-hero p.lead, .insights-hero p.lead {
    font-size: 1rem !important; font-weight: 300; opacity: 0.9;
}

/* === NAVBAR === */
header {
    background: rgba(27,43,31,0.92);
    backdrop-filter: blur(6px);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 3px 12px rgba(0,0,0,0.3);
    z-index: 10; position: relative; overflow: visible !important;
}
.navbar { background: transparent; }
.navbar-brand img {
    width: 140px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    transition: transform 0.3s ease, filter 0.3s ease;
}
.navbar-brand img:hover { transform: scale(1.06); filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5)); }
.navbar-nav .nav-link { color: #81C784 !important; font-weight: 500; transition: color 0.3s ease; }
.navbar-nav .nav-link:hover { color: #A5D6A7 !important; }

/* === BUTTONS === */
.hero .btn {
    background: #2E7D32; color: white; padding: 14px 34px;
    border-radius: 30px; font-size: 18px; font-weight: bold; border: none;
    transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.hero .btn:hover { background: #1B5E20; transform: translateY(-2px); }

/* === TYPOGRAPHY === */
h1 { font-size: 1.8rem !important; font-weight: 400; color: #2B2B2B; }
h2 { font-size: 1.5rem !important; font-weight: 600; color: #2B2B2B; }
h3 { font-size: 1.3rem !important; font-weight: 500; color: #2B2B2B; }
p, li { font-size: 1rem !important; font-weight: 300; color: #333; }

/* === HOME HERO WHITE TEXT === */
.hero.home-hero h1 { color: #FFFFFF !important; }
.hero.home-hero p.lead { color: #FFFFFFCC !important; }

/* === FEATURE IMAGES === */
.features .card img {
    width: 70% !important;
    max-width: 160px;
    height: auto;
    margin: 0 auto 10px auto;
    display: block;
}
@media (max-width: 768px) {
    .features .card img { width: 50% !important; max-width: 120px; }
}

/* === SUBHEADINGS === */
.section-title, .feature-box h3, .about-content h3 {
    font-size: 1.3rem !important; font-weight: 400 !important; color: #2E7D32 !important;
}

/* === INSIGHTS PAGE === */
.insights-generator { background: #fff; border-radius: 10px; padding: 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.insights-generator label { font-weight: 600; color: #2B2B2B; }
#insight-result { background: #f9f9f9; padding: 20px; border-radius: 10px; box-shadow: inset 0 1px 4px rgba(0,0,0,0.05); }
#loading-spinner, #loading-audio { font-weight: bold; color: #2E7D32; display: none; }

/* === RANGE SLIDERS === */
input[type="range"] { width: 100%; height: 6px; background: #E8F5E9; border-radius: 3px; }
input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; border-radius: 50%; background: #2E7D32; cursor: pointer; }

/* === AUDIO PLAYER === */
#audio-player-container { text-align: center; margin-top: 15px; display: none; }
#audio-progress { background: #E8F5E9; height: 8px; border-radius: 4px; overflow: hidden; }
#audio-progress-bar { background: #2E7D32; height: 100%; width: 0%; transition: width 0.3s; }
#audio-time { font-size: 14px; color: #2E7D32; margin-top: 5px; }

/* === FOOTER === */
footer {
    background: rgba(27,43,31,0.92);
    color: #FFFFFF !important;
    text-align: center;
    padding: 25px 0;
    margin-top: 40px;
    border-top: 2px solid #81C784;
}
footer * { color: #FFFFFF !important; }
footer a:hover { color: #C8E6C9 !important; }

/* === REMOVE CHAT WIDGET === */
.chat-btn, .chatbox-container { display: none !important; }

/* === RESPONSIVE === */
@media (max-width: 1200px) { .content-wrapper { max-width: 95%; } }
@media (max-width: 768px) {
    .content-wrapper { max-width: 100%; padding: 20px; font-size: 0.9rem; }
}

.hero-content {
    background: transparent !important;
    max-width: 1000px;    /* matches content-wrapper width */
    margin: 0 auto;
    padding: 0 20px;      /* keeps spacing inside */
}

/* Constrain hero text without adding a second panel */
.hero-inner {
    max-width: 1000px;     /* ✅ same as content-wrapper */
    margin: 0 auto;
    padding: 0 20px;
    background: transparent !important;

    /* === MOBILE OPTIMIZATION: Hide side panels on small screens === */
@media (max-width: 1000px) {
    body::before, body::after {
        display: none !important;
    }
}
}

/* === CHARACTER DESCRIPTION BOX === */
.char-desc-box {
    background: #f9f9f9;
    border-left: 4px solid #2E7D32;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.btn-personafi {
    background-color: #2E7D32 !important;
    border: none;
    color: #FFFFFF !important;
    font-weight: 600;
    transition: background 0.3s ease;
}
.btn-personafi:hover {
    background-color: #1B5E20 !important;
}

/* ✅ Make Register Now button match Home Page button */
.hero-btn {
    background: #2E7D32;       /* same green as hero */
    color: white;
    padding: 14px 34px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: inline-block;
    text-decoration: none;
}

.hero-btn:hover {
    background: #1B5E20;
    transform: translateY(-2px);
}

.char-desc-box {
    background: #f9f9f9;
    border-left: 4px solid #2E7D32;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333;
}

/* === PROFILE PAGE === */
.profile-hero {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    padding: 80px 0;
    color: #fff;
    border-radius: 0 0 30px 30px;
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #81C784;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

.profile-info {
    list-style: none;
    padding: 0;
    font-size: 1.05rem;
    color: #333;
}

.profile-info li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.profile-info li strong {
    color: #2E7D32;
}

.profile-actions .btn {
    margin: 10px;
}

/* ✅ Remove Bootstrap's default dropdown caret */
.navbar .dropdown-toggle::after {
    display: none !important;
}
#character-image-box {
    text-align: center;   /* ✅ Centers inline elements like <img> */
    margin: 20px 0;       /* ✅ Adds spacing */
}

#character-image {
    max-width: 250px;
    height: auto;
    display: block;    /* ✅ Always allow display */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
    opacity: 1;        /* ✅ Always visible */

}

#character-image.show {
    opacity: 1;
}

/* === PROFILE PAGE ENHANCEMENTS === */
.profile-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease forwards;
}

/* Subtle fade-in animation */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.profile-avatar:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.profile-info {
    font-size: 1.05rem;
    color: #333;
    margin-top: 15px;
}

.profile-info li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

.profile-info li:hover {
    background: #F1F8F4;
}

.profile-info li strong {
    color: #2E7D32;
}

.profile-actions .btn {
    background: #2E7D32;
    color: white;
    font-weight: 600;
    border-radius: 30px;
    padding: 10px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.profile-actions .btn:hover {
    background: #1B5E20;
    transform: translateY(-2px);
}
