/* ===== CSS VARIABLES ===== */
:root {
    --primary: #FE9EC7;
    --primary-dark: #fd7eb3;
    --secondary: #6c5ce7;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e74c3c;
    --dark: #2D3436;
    --gray: #636E72;
    --light: #dfe6e9;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-sm: rgba(0, 0, 0, 0.05);
    --gradient: linear-gradient(135deg, #FE9EC7 0%, #E8B4F8 100%);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: #f5f6fa;
    color: var(--dark);
    line-height: 1.6;
}

/* ===== LOGIN SCREEN ===== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.login-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-container {
    background: var(--white);
    border-radius: 30px;
    padding: 50px 40px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: var(--white);
}

.login-container h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 5px;
}

.login-container p {
    color: var(--gray);
    margin-bottom: 30px;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-group label i {
    color: var(--primary);
    margin-right: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--light);
    border-radius: 15px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(254, 158, 199, 0.2);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(254, 158, 199, 0.4);
}

.error-message {
    color: var(--danger);
    font-weight: 600;
    margin-top: 15px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ===== DASHBOARD SCREEN ===== */
.dashboard-screen {
    display: none;
    min-height: 100vh;
}

.dashboard-screen.active {
    display: flex;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: var(--white);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 2px 0 20px var(--shadow);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid var(--light);
    text-align: center;
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    color: var(--white);
}

.sidebar-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
}

.sidebar-header p {
    font-size: 0.9rem;
    color: var(--gray);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 25px;
    color: var(--gray);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background: rgba(254, 158, 199, 0.1);
    color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(254, 158, 199, 0.2) 0%, transparent 100%);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-item i {
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
}

.sidebar-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--light);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--gray);
    font-weight: 600;
}

.admin-info i {
    font-size: 1.5rem;
    color: var(--primary);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: var(--light);
    color: var(--gray);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-logout:hover {
    background: var(--danger);
    color: var(--white);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    background: #f5f6fa;
}

.content-header {
    background: var(--white);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    padding: 5px;
}

.content-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
}

.header-actions {
    display: flex;
    gap: 15px;
}

.btn-view-site {
    padding: 12px 20px;
    background: var(--gradient);
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-view-site:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(254, 158, 199, 0.4);
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    display: none;
    padding: 30px;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
}

.section-header h2 i {
    color: var(--primary);
    margin-right: 10px;
}

/* ===== BUTTONS ===== */
.btn-primary {
    padding: 12px 24px;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(254, 158, 199, 0.4);
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--white);
    color: var(--gray);
    border: 2px solid var(--light);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    padding: 12px 24px;
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-warning {
    padding: 12px 24px;
    background: var(--warning);
    color: var(--dark);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
}

.btn-warning:hover {
    background: #f39c12;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 20px var(--shadow-sm);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
}

.stat-icon.blue { background: linear-gradient(135deg, #74b9ff, #0984e3); }
.stat-icon.pink { background: var(--gradient); }
.stat-icon.green { background: linear-gradient(135deg, #55efc4, #00b894); }
.stat-icon.orange { background: linear-gradient(135deg, #ffeaa7, #fdcb6e); }

.stat-info h3 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--dark);
    line-height: 1;
}

.stat-info p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* ===== THEMES OVERVIEW ===== */
.themes-overview {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px var(--shadow-sm);
}

.themes-overview h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark);
}

.themes-overview h2 i {
    color: var(--primary);
    margin-right: 10px;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.theme-overview-card {
    background: var(--light);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.theme-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow);
}

.theme-overview-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.theme-overview-name {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.theme-overview-count {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
}

/* ===== RECENT ACTIVITY ===== */
.recent-activity {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px var(--shadow-sm);
}

.recent-activity h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark);
}

.recent-activity h2 i {
    color: var(--primary);
    margin-right: 10px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light);
    border-radius: 12px;
}

.activity-icon {
    width: 45px;
    height: 45px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.activity-info {
    flex: 1;
}

.activity-text {
    font-weight: 600;
    color: var(--dark);
}

.activity-time {
    font-size: 0.85rem;
    color: var(--gray);
}

/* ===== THEME TABS ===== */
.theme-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.theme-tab {
    padding: 12px 20px;
    background: var(--white);
    border: 2px solid var(--light);
    border-radius: 15px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.theme-tab.active {
    background: var(--gradient);
    border-color: var(--primary);
    color: var(--white);
}

.tab-icon {
    font-size: 1.2rem;
}

.theme-divider {
    padding: 0 10px;
    color: var(--gray);
    font-weight: bold;
    display: flex;
    align-items: center;
    user-select: none;
}

/* ===== QUESTIONS TOOLBAR ===== */
.questions-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 2px solid var(--light);
    border-radius: 15px;
    padding: 10px 20px;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    color: var(--gray);
    margin-right: 10px;
}

.search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
}

.questions-count {
    padding: 8px 16px;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.questions-count span {
    font-size: 1.2rem;
}

/* ===== QUESTIONS LIST ===== */
.questions-list {
    display: grid;
    gap: 15px;
}

.question-card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 3px 15px var(--shadow-sm);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.question-card:hover {
    box-shadow: 0 8px 25px var(--shadow);
}

.question-visual {
    width: 80px;
    height: 80px;
    background: var(--light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    flex-shrink: 0;
    overflow: hidden;
}

.question-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.question-content {
    flex: 1;
}

.question-text {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.question-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.question-badge {
    padding: 4px 12px;
    background: var(--light);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray);
}

.question-badge.correct {
    background: rgba(0, 184, 148, 0.2);
    color: var(--success);
}

.question-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon.edit {
    background: rgba(9, 132, 227, 0.2);
    color: #0984e3;
}

.btn-icon.edit:hover {
    background: #0984e3;
    color: var(--white);
}

.btn-icon.delete {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger);
}

.btn-icon.delete:hover {
    background: var(--danger);
    color: var(--white);
}

/* ===== CONTENT EDITOR ===== */
.content-editor {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 5px 20px var(--shadow-sm);
    overflow: hidden;
}

.editor-tabs {
    display: flex;
    border-bottom: 1px solid var(--light);
}

.editor-tab {
    padding: 18px 30px;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 3px solid transparent;
}

.editor-tab:hover {
    color: var(--primary);
}

.editor-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.editor-content {
    display: none;
    padding: 30px;
}

.editor-content.active {
    display: block;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--light);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
}

.form-section h3 i {
    color: var(--primary);
    margin-right: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--gray);
    font-size: 0.85rem;
}

/* ===== COLOR PICKERS ===== */
.color-pickers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.color-picker-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-picker-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.color-picker-group input[type="color"] {
    width: 100%;
    height: 50px;
    border: 2px solid var(--light);
    border-radius: 10px;
    cursor: pointer;
}

.color-picker-group input[type="text"] {
    padding: 10px;
    border: 2px solid var(--light);
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
}

/* ===== SUGGESTIONS EDITOR ===== */
.suggestions-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.suggestion-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.suggestion-item input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid var(--light);
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
}

.suggestion-item .btn-icon {
    width: 40px;
    height: 40px;
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger);
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

/* ===== THEMES EDITOR ===== */
.themes-editor {
    display: grid;
    gap: 20px;
}

.theme-edit-card {
    background: var(--light);
    border-radius: 15px;
    padding: 25px;
}

.theme-edit-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.theme-edit-icon {
    font-size: 2.5rem;
}

.theme-edit-name {
    font-weight: 700;
    font-size: 1.2rem;
}

/* ===== REPORTS TABLE ===== */
.reports-filter {
    margin-bottom: 20px;
}

.reports-table-wrapper {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-sm);
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
}

.reports-table thead {
    background: var(--gradient);
    color: var(--white);
}

.reports-table th {
    padding: 18px;
    text-align: left;
    font-weight: 600;
}

.reports-table tbody tr {
    border-bottom: 1px solid var(--light);
}

.reports-table tbody tr:hover {
    background: rgba(254, 158, 199, 0.05);
}

.reports-table td {
    padding: 18px;
}

.reports-table .score-high {
    color: var(--success);
    font-weight: 700;
}

.reports-table .score-medium {
    color: var(--warning);
    font-weight: 700;
}

.reports-table .score-low {
    color: var(--danger);
    font-weight: 700;
}

/* ===== SETTINGS GRID ===== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.setting-card {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px var(--shadow-sm);
}

.setting-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.setting-card h3 i {
    color: var(--primary);
    margin-right: 10px;
}

.setting-card p {
    color: var(--gray);
    margin-bottom: 20px;
}

.setting-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.system-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--light);
}

.info-row span:first-child {
    color: var(--gray);
    font-weight: 600;
}

.info-row span:last-child {
    color: var(--dark);
    font-weight: 700;
}

/* ===== JILID SETTINGS ===== */
.jilid-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.jilid-setting-item {
    background: var(--light);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.jilid-setting-item .jilid-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
}

.jilid-setting-item .jilid-name {
    font-weight: 600;
    color: var(--dark);
}

/* ===== AUDIO UPLOAD ===== */
.audio-upload-section {
    background: var(--light);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
}

.audio-preview-container {
    margin-top: 15px;
}

.audio-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px;
    text-align: center;
    color: var(--gray);
}

.audio-placeholder i {
    font-size: 3rem;
    color: var(--primary);
}

.audio-placeholder span {
    font-size: 0.95rem;
}

.audio-player-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--white);
    border-radius: 12px;
}

.audio-player-container audio {
    flex: 1;
    height: 40px;
}

.audio-name {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--success);
    font-weight: 600;
}

.audio-info {
    background: var(--primary);
    background: linear-gradient(135deg, #FE9EC7 0%, #E8B4F8 100%);
    border-radius: 15px;
    padding: 20px;
    color: var(--white);
}

.audio-info p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== MODAL HELPERS ===== */
.modal-content input[type="file"] {
    display: none;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 25px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-content.large {
    max-width: 900px;
}

.modal-content.small {
    max-width: 400px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--light);
    position: sticky;
    top: 0;
    background: var(--white);
    border-radius: 25px 25px 0 0;
    z-index: 10;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--light);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--gray);
}

.modal-close:hover {
    background: var(--danger);
    color: var(--white);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 30px;
    border-top: 1px solid var(--light);
    position: sticky;
    bottom: 0;
    background: var(--white);
    border-radius: 0 0 25px 25px;
}

/* ===== QUESTION FORM ===== */
.question-form {
    padding: 30px;
}

.question-form .form-section {
    background: var(--light);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: none;
}

.question-form .form-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.hidden {
    display: none !important;
}

/* ===== IMAGE UPLOAD ===== */
.image-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-preview {
    width: 100%;
    height: 200px;
    border: 2px dashed var(--light);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    background: var(--white);
}

.image-preview.has-image {
    border-style: solid;
    border-color: var(--primary);
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-preview i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.audio-preview {
    margin-top: 10px;
}

.audio-preview audio {
    width: 100%;
}

/* ===== ANSWERS EDITOR ===== */
.answers-editor {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-option {
    background: var(--white);
    border-radius: 12px;
    padding: 15px;
    border: 2px solid var(--light);
    transition: all 0.3s ease;
}

.answer-option.is-correct {
    border-color: var(--success);
    background: rgba(0, 184, 148, 0.1);
}

.answer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.answer-label {
    width: 35px;
    height: 35px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 800;
}

.answer-header input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--success);
}

.correct-badge {
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 600;
}

.answer-input {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid var(--light);
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--light);
}

/* ===== PLAYER DETAIL ===== */
.player-detail {
    padding: 30px;
}

.player-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light);
}

.player-avatar {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.player-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.player-stat {
    background: var(--light);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.player-stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
}

.player-stat-label {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--success);
    color: var(--white);
    padding: 16px 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    background: var(--danger);
}

.toast.warning {
    background: var(--warning);
    color: var(--dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .themes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .questions-toolbar {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        height: 100%;
    }

    .theme-tabs {
        justify-content: center;
    }

    .question-card {
        flex-direction: column;
    }

    .question-visual {
        width: 100%;
        height: 120px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .content-header h1 {
        font-size: 1.3rem;
    }

    .btn-view-site span {
        display: none;
    }

    .themes-grid {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 20px 15px;
    }

    .toast {
        left: 15px;
        right: 15px;
        bottom: 15px;
    }
}

/* ===== LOADING ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
