/* PENGATURAN UTAMA & VARIABEL WARNA */
:root {
    --primary: #6366f1;
    --secondary: #4facfe;
    --accent: #00f2fe;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.05);
}

/* VARIABEL WARNA MODE TERANG (LIGHT MODE) */
body.light-mode {
    --bg-gradient: linear-gradient(135deg, #e0e7ff 0%, #f1f5f9 50%, #e2e8f0 100%);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --text-color: #1e293b;
    --card-bg: rgba(255, 255, 255, 0.8);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

/* KOTAK UTAMA (WRAPPER) */
div {
    width: 100%;
    max-width: 1000px;
}

/* 1. HEADER & TOMBOL AKSI */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 1px;
}

.nav-logo {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 50%;
}

/* STYLING TOMBOL HEADER MODERN & MEWAH */
.header-tools {
    display: flex;
    gap: 12px;
    align-items: center;
    width: auto;
}

.btn-tool {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-tool:hover {
    transform: scale(1.12) rotate(8deg);
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.5);
}

.btn-tool:active {
    transform: scale(0.95);
}

/* ANIMASI PIRINGAN HITAM PUTAR SAAT MUSIK AKTIF */
.music-playing {
    animation: spinMusic 3s linear infinite;
    color: #10b981 !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6) !important;
}

@keyframes spinMusic {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 2. HERO & QUOTE SECTION */
.hero {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 25px 15px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.hero-logo {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid var(--secondary);
}

.hero h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 800;
}

.hero p {
    font-size: 0.95rem;
    opacity: 0.8;
}

.quote-box {
    margin-top: 15px;
    padding: 12px 18px;
    background: var(--card-bg);
    border: 1px dashed var(--glass-border);
    border-radius: 12px;
    font-size: 0.88rem;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.9;
}

/* 3. MENU NAVIGASI TOMBOL */
.menu-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.menu-title {
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-weight: 650;
    text-align: center;
}

.menu-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.btn-menu {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.btn-menu:hover, .btn-menu.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* 4. KARTU KONTEN UTAMA */
.container {
    width: 100%;
}

.glass-card {
    display: none;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.glass-card.active {
    display: block;
}

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

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

/* STRUKTUR ORGANISASI */
.org-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.org-box {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
}

.org-box i {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.org-box h4 {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 3px;
}

.org-box p {
    font-size: 0.95rem;
    font-weight: 600;
}

/* DAFTAR MURID */
.murid-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.murid-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.murid-card:hover {
    transform: translateY(-2px);
    border-color: var(--secondary);
}

.murid-card i {
    color: var(--secondary);
}

/* TABEL RESPONSIF */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
    min-width: 300px;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
}

th {
    background: var(--card-bg);
    font-weight: 600;
}

/* BOX PENGUMUMAN & MADING */
.announcement-box {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--secondary);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.announcement-box h4 {
    font-size: 0.95rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.announcement-box p {
    font-size: 0.88rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* FORM BUKU TAMU */
.form-input {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary);
}

.btn-send {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    width: 100%;
    transition: transform 0.2s ease;
}

.btn-send:hover {
    transform: translateY(-2px);
}

/* FOOTER */
footer {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 10px;
    padding-bottom: 15px;
}

/* RESPONSIVE DESIGN (TABLET & PC) */
@media screen and (min-width: 600px) {
    body { padding: 20px; }
    .hero { padding: 35px 20px; }
    .hero h1 { font-size: 2.2rem; }
    .org-grid { grid-template-columns: repeat(4, 1fr); }
    .murid-grid { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (min-width: 992px) {
    body { padding: 30px; }
    .btn-menu { padding: 10px 18px; font-size: 0.95rem; }
    .glass-card { padding: 30px; }
    .org-grid { grid-template-columns: repeat(4, 1fr); }
    .murid-grid { grid-template-columns: repeat(4, 1fr); }
    th, td { padding: 12px 15px; font-size: 1rem; }
}
