/* ==========================================
   Gaya Umum — AgSan Teknik
   ========================================== */

/* Reset & Dasar */
* {box-sizing:border-box; margin:0; padding:0; font-family:sans-serif;}
html, body {height:100%;}
body {
    background:#f0f8ff;
    padding:15px;
    max-width:650px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
}

/* Bagian Atas — Judul & Tombol Kembali */
.bagianatas {
    text-align:center;
    margin-bottom:15px;
    flex-shrink:0;
}
.bagianatas h2 {
    color:#2c3e50;
    margin-bottom:5px;
}

/* Tombol Kembali */
.kembali {
    display:inline-block;
    background:#3498db;
    color:white;
    padding:8px 15px;
    border-radius:8px;
    text-decoration:none;
    margin-bottom:10px;
    transition:background 0.2s;
}
.kembali:hover, .kembali:active {
    background:#2980b9;
}

/* Konten yang Bisa Di-scroll */
.daftar-materi {
    flex:1;
    overflow-y:auto;
    padding-bottom:20px;
}

/* Tombol Materi — Kartu Link */
.tombol-materi {
    display:block;
    background:white;
    padding:18px 15px;
    border-radius:12px;
    margin-bottom:12px;
    box-shadow:0 2px 5px rgba(0,0,0,0.1);
    text-decoration:none;
    color:inherit;
    transition:all 0.2s ease;
    border-left:4px solid transparent;
}
.tombol-materi:hover {
    transform:translateX(5px);
    background:#f0f7ff;
    border-left-color:#3498db;
}
.tombol-materi.terakhir {
    border-left-color:#e67e22;
    background:#fff8f0;
}
.tombol-materi.terakhir h3 {
    color:#e67e22;
}
.tombol-materi:active {
    transform:scale(0.98);
}
.tombol-materi h3 {
    color:#2980b9;
    margin-bottom:5px;
    font-size:17px;
}
.tombol-materi p {
    color:#666;
    font-size:14px;
    line-height:1.6;
    text-align:justify;
}

/* Label Terakhir Dibuka */
.tanda-terakhir {
    display:inline-block;
    font-size:12px;
    background:#ffe8cc;
    color:#e67e22;
    padding:2px 8px;
    border-radius:10px;
    margin-top:6px;
}

/* Kartu Materi — Kotak Isi Materi */
.kartu-materi {
    background:white;
    padding:15px;
    border-radius:12px;
    margin-bottom:12px;
    box-shadow:0 2px 5px rgba(0,0,0,0.1);
}
.kartu-materi h3 {
    color:#2980b9;
    margin-bottom:8px;
    font-size:17px;
}
.kartu-materi p {
    color:#555;
    line-height:1.6;
    font-size:15px;
    text-align:justify;
}

/* Kotak Rumus */
.kotak-rumus {
    background:#e8f4fc;
    padding:12px;
    border-radius:8px;
    text-align:center;
    font-weight:bold;
    font-size:16px;
    color:#2c3e50;
    margin:10px 0;
}

/* Kotak Catatan */
.catatan {
    background:#fffbea;
    padding:10px;
    border-radius:6px;
    margin-top:8px;
    font-size:14px;
    color:#2c3e50;
    text-align:justify;
}

/* Catatan di dalam kartu-materi */
.kartu-materi .catatan {
    background:#e8f4fc;
    padding:8px;
    border-radius:6px;
    margin-top:8px;
    font-size:14px;
    color:#2c3e50;
    text-align:justify;
}

/* Kotak Contoh */
.contoh {
    background:#efffef;
    padding:10px;
    border-radius:6px;
    margin-top:8px;
    font-size:14px;
    color:#2c3e50;
    text-align:justify;
}

/* Tombol Hitung */
.tombol-hitung {
    display:block;
    background:#27ae60;
    color:white;
    text-align:center;
    padding:14px 20px;
    border-radius:10px;
    text-decoration:none;
    font-weight:bold;
    font-size:16px;
    margin-top:10px;
    border:none;
    width:100%;
    cursor:pointer;
    transition:background 0.2s;
}
.tombol-hitung:hover {
    background:#219653;
}

/* ========================================
   Halaman: Hitung Resistor LED
======================================== */

/* Grup Input Form */
.input-grup {
    margin: 12px 0;
}

label {
    display: block;
    color: #2c3e50;
    font-weight: bold;
    margin-bottom: 5px;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
}

/* Kotak Hasil Perhitungan */
.hasil {
    background: #efffef;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
}

.hasil h3 {
    color: #27ae60;
    margin-top: 0;
}

.nilai-besar {
    font-size: 24px;
    font-weight: bold;
    color: #27ae60;
    text-align: center;
    padding: 10px;
}

/* Kotak Perbandingan AC & DC */
.banding {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin:10px 0;
}
.kolom {
    padding:12px;
    border-radius:8px;
}
.ac {background:#fff3cd;}
.dc {background:#d1e7dd;}
.kolom h4 {
    margin:0 0 8px 0;
    font-size:15px;
}
.kolom p {
    text-align:justify;
    margin:0;
}

/* Daftar Warna Kabel */
.warna-kabel {
    display:flex;
    align-items:center;
    padding:6px 8px;
    margin:4px 0;
    border-radius:6px;
    background:#f8f9fa;
}
.lingkaran {
    width:18px;
    height:18px;
    border-radius:50%;
    display:inline-block;
    margin-right:10px;
    border:1px solid #ccc;
}
.cokelat {background:#8B4513;}
.biru {background:#0066CC;}
.kuninghijau {background:linear-gradient(90deg, #FFD700 50%, #008000 50%);}
.hitam {background:#000000;}
.abu {background:#9E9E9E;}
.merah {background:#FF0000;}

/* Tabel Sederhana */
.tabel {
    width:100%;
    margin:10px 0;
}
.baris {
    display:flex;
    padding:8px 6px;
    border-bottom:1px solid #eee;
    font-size:14px;
}
.baris div {padding:3px 0;}
.baris.kepala {
    background:#e8f4fc;
    font-weight:bold;
    border-radius:6px 6px 0 0;
}
.kol1 {width:28%;}
.kol2 {width:32%;}
.kol3 {width:40%;}

/* Peringatan & Alur */
.peringatan {
    background:#fff2f2;
    border-left:4px solid #e74c3c;
    padding:10px;
    border-radius:0 6px 6px 0;
    margin-top:8px;
    font-size:14px;
    color:#c0392b;
    text-align:justify;
}
.alur {
    background:#f8fbff;
    padding:12px;
    border-radius:8px;
    text-align:center;
    margin:10px 0;
    font-weight:500;
    color:#2c3e50;
}

/* Halaman Tentang */
.kartu {
    background:white;
    padding:15px;
    border-radius:12px;
    margin-bottom:12px;
    box-shadow:0 2px 5px rgba(0,0,0,0.1);
}
.kartu h3 {
    color:#8e44ad;
    margin-bottom:8px;
    font-size:17px;
}
.kartu p {
    color:#555;
    line-height:1.7;
    font-size:15px;
    text-align:justify;
}
.kartu .catatan {
    background:#f4effa;
    padding:10px;
    border-radius:6px;
    margin-top:8px;
    font-size:14px;
    color:#2c3e50;
    text-align:justify;
}
.daftar-tujuan {
    margin:10px 0;
    padding-left:20px;
}
.daftar-tujuan li {
    margin:6px 0;
    color:#555;
    text-align:justify;
}

/* Halaman Kontak */
.baris-kontak {
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:8px 0;
}
.ikon {
    font-size:18px;
    flex-shrink:0;
}
.teks {
    flex:1;
}
.teks a {
    color:#25D366;
    text-decoration:none;
    font-weight:bold;
}
.teks a:hover {
    text-decoration:underline;
}
.keterangan {
    font-size:13px;
    color:#888;
    margin-top:2px;
}
