/* =========================================
    GLOBAL STYLES & AURORA BACKGROUND
   ========================================= */

:root {
    --accent-color: #3d5afe; /* Biru terang sebagai aksen */
    --card-bg-color: rgba(22, 22, 29, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0f0f16;
    color: #e0e0e0;
    overflow-x: hidden; /* Mencegah scroll horizontal */
    position: relative;
}

.aurora-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(circle at 10% 20%, hsla(212, 89%, 60%, 0.4), transparent 40%),
        radial-gradient(circle at 80% 90%, hsla(280, 89%, 60%, 0.4), transparent 40%),
        radial-gradient(circle at 50% 50%, hsla(180, 89%, 50%, 0.3), transparent 50%);
    animation: aurora-flow 20s linear infinite;
}

@keyframes aurora-flow {
    0% { transform: rotate(0deg) scale(1.5); }
    50% { transform: rotate(180deg) scale(2.0); }
    100% { transform: rotate(360deg) scale(1.5); }
}

/* =========================================
    STYLING KONTEN
   ========================================= */

.main-content {
    padding-top: 8rem; /* Memberi ruang di bawah navbar */
    padding-bottom: 5rem;
}

.hero {
    padding-bottom: 5rem;
}

.hero .lead {
    color: rgba(255, 255, 255, 0.7);
}

/* =========================================
    GLASSMORPHISM COMPONENTS
   ========================================= */

/* Navbar Kaca */
.glass-nav {
    background: rgba(10, 10, 15, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.navbar .nav-link:hover, .navbar .nav-link.active {
    color: #fff;
}

/* Kartu Kaca */
.glass-card {
    background: var(--card-bg-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.glass-card h5 {
    color: #fff;
    font-weight: 600;
}

/* =========================================
    HALAMAN TOOLS (Styling lama yang disesuaikan)
   ========================================= */

.content-wrapper {
    padding-top: 100px;
}

textarea {
    font-family: 'Courier New', Courier, monospace !important;
    background-color: #16161a !important; 
    color: #d4d4d4 !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
}

textarea:focus {
    box-shadow: 0 0 0 0.25rem rgba(61, 90, 254, 0.25) !important;
    border-color: var(--accent-color) !important;
}

/* =========================================
    GAYA UNTUK HALAMAN AI CHAT
   ========================================= */
.chat-window {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-bubble {
    padding: 10px 15px;
    border-radius: 1.25rem;
    max-width: 75%;
    line-height: 1.5;
}

.user-bubble {
    background-color: var(--accent-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0.5rem;
}

.assistant-bubble {
    background-color: #343a40;
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 0.5rem;
}

.chat-input-area textarea {
    resize: none;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #e0e0e0;
    margin: 0 2px;
    animation: bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* =========================================
    GAYA UNTUK GAME CAK LONTONG
   ========================================= */

/* Animasi getar untuk jawaban salah */
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.shake-error {
  animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

#question-area {
    background-color: rgba(0,0,0,0.2);
    border-radius: 0.5rem;
}

/* =========================================
    PERBAIKAN NAVBAR SCROLL DI PONSEL
   ========================================= */

/* Aturan ini hanya berlaku untuk layar tablet dan ponsel (lebar di bawah 992px) */
@media (max-width: 991.98px) {
  .navbar-collapse {
    max-height: 75vh; /* Batasi tinggi maksimal hingga 75% dari tinggi layar */
    overflow-y: auto;   /* Tambahkan scrollbar vertikal jika kontennya lebih panjang */
  }
}

/* =========================================
    GAYA UNTUK FANDIRR ANIME
   ========================================= */
.anime-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: transform 0.2s ease-in-out;
}
.anime-card:hover {
    transform: scale(1.05);
}
.anime-card img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}
.anime-card .card-img-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.anime-card .card-title {
    font-size: 1rem;
    font-weight: 600;
}
.anime-card .card-text {
    font-size: 0.8rem;
}
.anime-card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
}