/* General Styling */
:root {
    --primary-color: #2e7d32; /* Hijau Tua */
    --secondary-color: #f9a825; /* Emas/Kuning */
    --dark-bg: #121212;
    --dark-bg-secondary: #1E1E1E;
    --text-light: #E0E0E0;
    --text-dark: #212121;
    --white: #FFFFFF;
    --gray: #9E9E9E;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--dark-bg);
    color: var(--text-light);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
}

.nav-menu ul {
    list-style: none;
    display: flex;
}

.nav-menu ul li {
    margin-left: 25px;
}

.nav-menu ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu ul li a:hover {
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
}

.btn-cta {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
    font-size: 1.1rem;
    padding: 12px 30px;
}

.btn-cta:hover {
    background-color: #ffc107; /* Emas lebih terang */
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('assets/img/hero-bg.jpg') no-repeat center center/cover;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* Content Sections */
.content-section {
    padding: 60px 0;
    background-color: var(--dark-bg-secondary);
}

.content-section-dark {
    padding: 60px 0;
    background-color: var(--dark-bg);
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.content-section p, .content-section-dark p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px auto;
    color: var(--text-light);
}

/* Preview Section */
.class-selection {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.class-card {
    background: var(--dark-bg-secondary);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 30%;
    min-width: 250px;
    text-decoration: none;
    color: var(--text-light);
    border: 1px solid #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.class-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(249, 168, 37, 0.1);
}

.class-card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Author Section */
.author-profile {
    display: flex;
    align-items: center;
    gap: 40px;
}
.author-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary-color);
}
.author-details {
    text-align: left;
}
.author-details h2, .author-details p {
    text-align: left;
    margin-bottom: 15px;
}
.author-details h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* Registered Lists */
#registered-lists h2 {
    margin-bottom: 40px;
}
.table-container {
    display: grid; /* Menggunakan CSS Grid */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* 3 kolom fleksibel */
    gap: 25px;
}
.table-wrapper {
    background: var(--dark-bg-secondary);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #333;
}
.table-wrapper h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
    text-align: center;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px;
    border-bottom: 1px solid #333;
    text-align: left;
}
thead th {
    background-color: #252525;
    color: var(--secondary-color);
}
tbody tr:nth-child(even) {
    background-color: #252525;
}

/* Footer */
footer {
    background: var(--dark-bg-secondary);
    color: var(--gray);
    padding: 40px 0 20px;
    border-top: 1px solid #333;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-col h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 10px;
}
.footer-col a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-col a:hover {
    color: var(--secondary-color);
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
}


/* --- Authentication Pages (Login & Register) --- */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--dark-bg);
}

.auth-container {
    background: var(--dark-bg-secondary);
    padding: 40px;
    border-radius: 10px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h2 {
    margin-bottom: 10px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--gray);
}

.auth-form input, .auth-form select {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #333;
    color: var(--text-light);
    font-size: 1rem;
}

.auth-form input:focus, .auth-form select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.btn-full {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Role Selector */
.role-selector {
    display: flex;
    margin-bottom: 20px;
    border: 1px solid #444;
    border-radius: 5px;
    overflow: hidden;
}
.btn-role {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}
.btn-role.active {
    background-color: var(--primary-color);
    font-weight: bold;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}
.alert-success {
    background-color: #2e7d32;
    color: #fff;
}
.alert-danger {
    background-color: #c62828;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu { display: none; } /* Simplifikasi untuk contoh, bisa diganti dengan menu hamburger */
    .hero h1 { font-size: 2.2rem; }
    .author-profile { flex-direction: column; text-align: center; }
    .author-details h2, .author-details p { text-align: center; }
}
/* --- Styling untuk Modal Syarat & Ketentuan --- */

.modal {
    display: none; /* Sembunyi secara default */
    position: fixed; /* Tetap di tempat saat di-scroll */
    z-index: 2000; /* Tampil di atas segalanya */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Bisa di-scroll jika konten panjang */
    background-color: rgba(0, 0, 0, 0.6); /* Latar belakang gelap transparan */
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--dark-bg-secondary);
    color: var(--text-light);
    margin: 5% auto;
    padding: 30px 40px;
    border: 1px solid #555;
    width: 80%;
    max-width: 750px;
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.5s;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 15px; /* Memberi ruang untuk scrollbar */
}

.modal-body h4 {
    color: var(--secondary-color);
    margin-top: 25px;
    margin-bottom: 10px;
    border-left: 3px solid var(--secondary-color);
    padding-left: 10px;
}

.modal-body ul {
    list-style-position: inside;
    padding-left: 10px;
}

.modal-body ul li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: var(--white);
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.95);}
    to {opacity: 1; transform: scale(1);}
}