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

:root {
    /* Palet Warna Ceria & Playful */
    --primary: #FF6B6B;
    --primary-hover: #FF5252;
    --secondary: #4ECDC4;
    --purple: #845EC2;
    --pink: #FF67E7;
    --yellow: #FFC75F;
    --orange: #FF9671;
    --blue: #00C9A7;
    
    --bg-main: #F7F9FC;
    --card-bg: rgba(255, 255, 255, 0.92);
    --text-dark: #2D3748;
    --text-muted: #718096;
    --border-color: #E2E8F0;

    /* Legacy compatibility variables */
    --cyan: #4ECDC4;
    --gold: #FFC75F;
    --violet: #845EC2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

h1, h2, h3, h4, .logo {
    font-family: 'Fredoka', cursive, 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #FFE5EC 0%, #F0F4FF 35%, #E8F8F5 70%, #FFF0F6 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Pattern latar belakang ceria (bubbles) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 107, 107, 0.12) 0%, transparent 20%),
        radial-gradient(circle at 90% 10%, rgba(78, 205, 196, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(132, 94, 194, 0.12) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(255, 199, 95, 0.15) 0%, transparent 20%);
    pointer-events: none;
    z-index: -1;
}

/* Typography Utilities */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.title-lg { 
    font-size: 2.5rem; 
    font-weight: 700; 
    color: var(--purple);
    letter-spacing: 0.5px;
}
.subtitle { 
    font-size: 1.2rem; 
    color: var(--orange); 
    font-weight: 600;
}
.text-sm { font-size: 0.95rem; color: var(--text-muted); }

.neon-text { 
    background: linear-gradient(45deg, var(--primary), var(--pink), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}
.neon-cyan { 
    color: var(--secondary); 
    font-weight: 800;
}

.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.w-100 { width: 100%; }

/* Navigation Bar Ceria */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 6%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid #FFF;
    box-shadow: 0 4px 20px rgba(132, 94, 194, 0.08);
}

.logo { 
    font-size: 1.6rem; 
    font-weight: 700; 
    color: var(--purple);
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo i {
    color: var(--primary);
    transform: rotate(-10deg);
    transition: transform 0.3s ease;
}
.logo:hover i {
    transform: rotate(10deg) scale(1.1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links span {
    font-weight: 600;
    padding: 6px 14px;
    background: #FFF;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.nav-links button { 
    background: #FFF; 
    border: 2px solid var(--border-color); 
    color: var(--text-dark); 
    cursor: pointer; 
    font-size: 0.95rem; 
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-links button:hover {
    background: var(--purple);
    color: #FFF;
    border-color: var(--purple);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(132, 94, 194, 0.25);
}

/* App Container & Main Cards */
#app-container {
    width: 90%;
    max-width: 900px;
    margin: 35px auto 50px;
}

.view { display: none; }
.view.active { 
    display: block; 
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.95) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 3px solid #FFFFFF;
    border-radius: 24px;
    padding: 35px 30px;
    box-shadow: 0 15px 35px rgba(132, 94, 194, 0.1), 0 5px 15px rgba(0, 0, 0, 0.04);
}

/* Tombol-Tombol Colorful & Bouncy */
.btn {
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn:active {
    transform: scale(0.96) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--pink) 100%);
    color: #FFF;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(255, 107, 107, 0.45);
}

.btn-outline {
    background: #FFF;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: #FFF;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.35);
}

.btn-text { 
    background: transparent; 
    color: var(--text-muted); 
    box-shadow: none;
}
.btn-text:hover { color: var(--purple); text-decoration: underline; }

.btn-lg { 
    font-size: 1.15rem; 
    padding: 16px 36px; 
    border-radius: 50px;
}

/* Form & Input Fields */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600; 
    color: var(--purple); 
    font-size: 0.95rem;
}

input, select {
    width: 100%;
    padding: 14px 18px;
    border-radius: 16px;
    border: 2px solid #E2E8F0;
    background: #FAFCFE;
    color: var(--text-dark);
    font-size: 1rem;
    outline: none;
    transition: all 0.25s ease;
}

input:focus, select:focus {
    border-color: var(--pink);
    background: #FFF;
    box-shadow: 0 0 0 4px rgba(255, 103, 231, 0.15);
}

.password-container { position: relative; }
.password-container i { 
    position: absolute; 
    right: 18px; 
    top: 50%; 
    transform: translateY(-50%);
    cursor: pointer; 
    color: var(--text-muted); 
    font-size: 1.1rem;
}

/* Progress Bar Ceria */
.progress-bar-container { 
    width: 100%; 
    height: 12px; 
    background: #E2E8F0; 
    border-radius: 20px; 
    margin-bottom: 20px; 
    overflow: hidden;
    padding: 2px;
}

.progress-bar { 
    height: 100%; 
    background: linear-gradient(90deg, var(--secondary), var(--yellow), var(--primary)); 
    border-radius: 20px;
    width: 0%; 
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

/* Pilihan Soal & Quiz Card */
.question-block { 
    margin-bottom: 25px; 
    padding: 20px; 
    background: #FFF;
    border-radius: 18px;
    border: 2px solid #F0F4F8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.question-block p {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 12px;
    color: var(--purple);
}

.options label { 
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px; 
    background: #F8FAFC; 
    margin-bottom: 8px; 
    border-radius: 12px; 
    border: 2px solid transparent;
    cursor: pointer; 
    font-weight: 500;
    transition: all 0.2s ease;
}

.options label:hover {
    background: #FFF;
    border-color: var(--secondary);
    transform: translateX(4px);
}

.options input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--pink);
    cursor: pointer;
}

/* Tabel Guru Ceria */
.table-responsive { 
    overflow-x: auto; 
    border-radius: 16px;
}

table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0;
    margin-top: 15px; 
}

th { 
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: #FFF; 
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
}

th:first-child { border-top-left-radius: 12px; }
th:last-child { border-top-right-radius: 12px; }

td { 
    padding: 14px 16px; 
    background: #FFF;
    border-bottom: 1px solid #EDF2F7; 
    color: var(--text-dark);
}

tr:last-child td:first-child { border-bottom-left-radius: 12px; }
tr:last-child td:last-child { border-bottom-right-radius: 12px; }

tr:hover td {
    background: #F8FAFC;
}

/* Responsive Touch */
@media (max-width: 600px) {
    #app-container { width: 94%; margin-top: 20px; }
    .glass-card { padding: 25px 18px; }
    .title-lg { font-size: 1.8rem; }
    .btn-lg { width: 100%; }
}