/* UPDATED: Dark mode text colors, card layout, visual options */

/* Day mode base styles */
body {
    background: url('/assets/img/background-care.jpg') no-repeat center center fixed;
    background-size: cover;
    background-color: #f0f0f0;
    color: #333;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.4);
    z-index: 0;
    pointer-events: none;
}

h1, h2, h3 {
    color: #333;
}

.card,
.content-box,
.chat-box {
    background: rgba(255,255,255,0.85);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: none;
}

/* Global survey styles */
.option-item, .globiad-item, .istap-card, .mna-option {
    border: 2px solid rgba(15,23,42,0.12);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.92);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}
.option-item:hover, .globiad-item:hover, .istap-card:hover, .mna-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15,23,42,0.12);
}
.option-item.selected, .globiad-item.selected, .istap-card.selected, .mna-option.selected {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17,24,39,0.12) inset;
    background: rgba(17,24,39,0.04);
}
/* Image styling */
.option-image {
    max-height: 150px;
    object-fit: cover;
}
/* Card helper for scale questions */
.scale-card {
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.scale-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}
.scale-card.selected {
    border-color: #0d6efd;
    box-shadow: 0 0.5rem 1rem rgba(13,110,253,0.25);
}

/* Rounded large buttons */
.btn-rounded {
    border-radius: 50rem;
}

/* Dark mode overrides */
body[data-theme="dark"] {
    background: url('/assets/img/background-care.jpg') no-repeat center center fixed;
    background-size: cover;
    background-color: #121212;
    color: #f1f3f5;
}

body.dark-mode::before,
body[data-theme="dark"]::before,
html[data-theme="dark"] body::before {
    background: rgba(0,0,0,0.4);
}

/* Shared background utility */
.app-bg {
    position: relative;
    min-height: 100vh;
    background: url('/assets/img/background-care.jpg') no-repeat center center fixed;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.app-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.18);
    pointer-events: none;
    z-index: 0;
}

body[data-theme="dark"].app-bg::before,
html[data-theme="dark"] body.app-bg::before {
    background: rgba(0,0,0,0.35);
}

.app-content {
    position: relative;
    z-index: 1;
}
body[data-theme="dark"] .option-item,
body[data-theme="dark"] .globiad-item,
body[data-theme="dark"] .istap-card,
body[data-theme="dark"] .mna-option,
body[data-theme="dark"] .scale-card {
    background-color: #1f1f1f;
    color: #f1f3f5;
    border-color: #2b2b2b;
}
body[data-theme="dark"] .option-item,
body[data-theme="dark"] .globiad-item,
body[data-theme="dark"] .istap-card,
body[data-theme="dark"] .mna-option,
body[data-theme="dark"] .scale-card {
    border-color: rgba(248,250,252,0.25);
}
body[data-theme="dark"] .option-item.selected,
body[data-theme="dark"] .globiad-item.selected,
body[data-theme="dark"] .istap-card.selected,
body[data-theme="dark"] .mna-option.selected,
body[data-theme="dark"] .scale-card.selected {
    border-color: #f8fafc;
    box-shadow: 0 0 0 3px rgba(248,250,252,0.14) inset;
}
body[data-theme="dark"] .card,
body[data-theme="dark"] .alert,
body[data-theme="dark"] .complete-hero,
body[data-theme="dark"] .content-box,
body[data-theme="dark"] .chat-box {
    background: rgba(0,0,0,0.7);
    color: #f1f3f5;
    border: none;
}
body[data-theme="dark"] .page-title,
body[data-theme="dark"] .meta,
body[data-theme="dark"] .lead,
body[data-theme="dark"] .card-header,
body[data-theme="dark"] .card-body,
body[data-theme="dark"] .card-body p,
body[data-theme="dark"] .card-body h5,
body[data-theme="dark"] .mna-question h5,
body[data-theme="dark"] .mna-option,
body[data-theme="dark"] .form-check-label,
body[data-theme="dark"] .mna-info {
    color: #f1f3f5 !important;
}
body[data-theme="dark"] .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}
/* Education page styles */
body, .education-content {
    font-family: 'Poppins', 'Roboto', sans-serif;
}
.education-content {
    line-height: 1.8;
    font-size: 1.1rem;
}
.education-content p,
.education-content li {
    text-align: justify;
}
.education-content h1,
.education-content h2,
.education-content h3 {
    font-weight: 700;
    margin-top: 1.5rem;
}
.education-content h1 { font-size: 2rem; }
.education-content h2 { font-size: 1.6rem; }
.education-content h3 { font-size: 1.3rem; }
.education-content ul { padding-left: 1.5rem; }
.education-content li { margin-bottom: .5rem; }
.education-content li::marker { font-weight: bold; }

/* Scrollbar styling */
body::-webkit-scrollbar {
    width: 8px;
}
body::-webkit-scrollbar-track {
    background: var(--bs-body-bg);
}
body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
body::-webkit-scrollbar-thumb:hover {
    background: #555;
}
body[data-theme="dark"]::-webkit-scrollbar-thumb {
    background: #555;
}
body[data-theme="dark"]::-webkit-scrollbar-thumb:hover {
    background: #777;
}
