/* ============================================================
   KIDS STYLE - GABUNGAN UNTUK ANAK-ANAK (DESKTOP)
   ============================================================ */

/* VARIABLES & ROOT */
:root {
    /* Colors */
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FF9800;
    --pink: #E91E63;
    --purple: #9C27B0;
    --cyan: #00BCD4;
    --yellow: #FFEB3B;
    --orange: #FF5722;
    --green: #8BC34A;
    --blue: #03A9F4;
    
    /* Neutral Colors */
    --text-color: #333;
    --light-text: #666;
    --background: #f8f9fa;
    --card-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --border-radius: 20px;
    --border-radius-small: 12px;
}

/* RESET & GLOBAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* KIDS MODE - TAMPILAN UTAMA */
body.kids-mode {
    font-family: 'Comic Neue', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Sembunyikan sidebar dan navbar di kids mode */
body.kids-mode .dashboard {
    display: block;
}

body.kids-mode .sidebar {
    display: none;
}

body.kids-mode .main-content {
    margin-left: 0;
    width: 100%;
}

body.kids-mode .navbar {
    display: none;
}

body.kids-mode .content {
    padding: 20px;
    background: transparent;
}

/* HEADER KHUSUS ANAK-ANAK */
.kids-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--green) 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.kids-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--pink), var(--yellow), var(--cyan));
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    animation: bounce 2s infinite;
}

.logo h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.2rem;
    margin: 0;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 10px 0 20px;
}

/* MAIN CONTENT */
.kids-main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.section-title {
    font-family: 'Fredoka One', cursive;
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ACTION CARDS GRID (DASHBOARD) */
.action-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.action-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 3px solid transparent;
    cursor: pointer;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.card-content {
    flex: 1;
}

.card-content h4 {
    font-family: 'Fredoka One', cursive;
    margin-bottom: 8px;
    font-size: 1.4rem;
    color: #333;
}

.card-content p {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.card-arrow {
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* GRID HEWAN 5 KOLOM (DESKTOP) */
.animal-cards-grid,
.animals-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 kolom untuk desktop */
    gap: 20px;
    margin-bottom: 30px;
}

/* KARTU HEWAN */
.animal-card-mini,
.animal-card {
    background: white;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 3px solid transparent;
}

.animal-card-mini:hover,
.animal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

/* KONTAINER GAMBAR */
.animal-image,
.animal-image-container {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.animal-image img,
.animal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.animal-card:hover .animal-image img,
.animal-card:hover .animal-image-container img {
    transform: scale(1.05);
}

/* TOMBOL PLAY SOUND */
.play-sound-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(76, 175, 80, 0.9);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.play-sound-btn:hover {
    background: #45a049;
    transform: scale(1.1);
}

.play-sound-btn.playing {
    animation: pulse 0.5s infinite;
}

/* BADGE KATEGORI */
.animal-category {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* INFO HEWAN */
.animal-info {
    padding: 15px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.animal-info h4 {
    font-family: 'Fredoka One', cursive;
    margin: 0 0 10px;
    font-size: 1.2rem;
    color: var(--text-color);
}

.animal-actions {
    margin-top: 10px;
}

/* TOMBOL AKSI */
.btn-view,
.btn-learn,
.btn-view-all,
.btn-explore,
.btn-quiz {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view:hover,
.btn-learn:hover,
.btn-view-all:hover,
.btn-explore:hover,
.btn-quiz:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-view-all {
    background: var(--secondary-color);
    margin-top: 20px;
}

.btn-view-all:hover {
    background: #1976d2;
}

.view-all-container {
    text-align: center;
    margin-top: 20px;
}

/* CATEGORY FILTER GRID */
.category-filter {
    margin-bottom: 40px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.category-card {
    background: white;
    border: 3px solid transparent;
    border-radius: var(--border-radius-small);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.category-card.active {
    border-color: var(--accent-color);
    background: #FFF3E0;
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.category-content h4 {
    font-family: 'Fredoka One', cursive;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.category-content p {
    color: var(--light-text);
    font-size: 0.9rem;
}

.category-badge {
    margin-top: 10px;
    color: var(--accent-color);
}

/* QUIZ CONTAINER */
.quiz-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.quiz-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* SOUND SECTION */
.sound-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: var(--border-radius-small);
    padding: 25px;
    text-align: center;
}

.sound-header h3 {
    font-family: 'Fredoka One', cursive;
    margin-bottom: 20px;
    color: #1976d2;
}

.play-quiz-sound {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px auto;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.play-quiz-sound:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

.play-status {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

.play-status.active {
    color: #4CAF50;
}

.play-status.warning {
    color: #FF9800;
}

/* QUIZ OPTIONS */
.quiz-options {
    background: #f8f9fa;
    border-radius: var(--border-radius-small);
    padding: 25px;
}

.options-header h3 {
    font-family: 'Fredoka One', cursive;
    margin-bottom: 20px;
    color: #333;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.option-card {
    background: white;
    border-radius: var(--border-radius-small);
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
    box-shadow: var(--shadow);
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: #2196F3;
}

.option-image {
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
}

.option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.option-name span {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: #333;
}

.feedback-icon {
    margin-top: 10px;
    font-size: 1.5rem;
}

.correct-answer {
    border-color: #4CAF50 !important;
    background-color: #e8f5e9;
}

.wrong-answer {
    border-color: #f44336 !important;
    background-color: #ffebee;
}

/* QUIZ RESULT */
.quiz-result {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: var(--border-radius-small);
    padding: 25px;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.result-icon {
    font-size: 3rem;
    color: #4CAF50;
}

.result-text h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #333;
}

.result-text p {
    color: #666;
    font-size: 1.1rem;
}

.btn-next-quiz {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-next-quiz:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* NO DATA / EMPTY STATES */
.no-animals,
.no-quiz,
.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-animals i,
.no-quiz i,
.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-animals h4,
.no-quiz h4,
.empty-state h4 {
    font-family: 'Fredoka One', cursive;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* COUNT BADGE */
.count-badge {
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: 10px;
}

/* SEARCH BOX (Tersembunyi untuk Anak) */
#searchAnimal {
    opacity: 0;
    position: absolute;
    top: -9999px;
}

/* FOOTER KHUSUS ANAK-ANAK */
.kids-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
}

.footer-info p {
    margin: 5px 0;
    opacity: 0.9;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
}

.nav-link:hover {
    opacity: 0.8;
}

/* ANIMATIONS */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* UTILITY CLASSES */
.text-center {
    text-align: center;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    /* Tablet: 3 kolom untuk grid hewan */
    .animal-cards-grid,
    .animals-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile: 2 kolom untuk grid hewan */
    .animal-cards-grid,
    .animals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .animal-image,
    .animal-image-container {
        height: 150px;
    }
    
    .action-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* Small Mobile */
    .animal-cards-grid,
    .animals-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* STYLES TAMBAHAN UNTUK KIDS MODE */
.kid-welcome {
    background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

.welcome-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.child-friendly-btn {
    background: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.child-friendly-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.4);
}

/* ============================================================
   DESKRIPSI HEWAN - STYLING KHUSUS
   ============================================================ */

/* Animal Detail Container */
.animal-detail-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

/* Animal Detail Header */
.animal-detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.animal-detail-header h2 {
    font-family: 'Fredoka One', cursive;
    color: #333;
    font-size: 2.2rem;
    margin: 0;
}

/* Back Button - Style untuk Kids Mode */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
    border: 3px solid transparent;
}

.back-btn:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 118, 210, 0.3);
}

/* Animal Detail Content Grid */
.animal-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .animal-detail-content {
        grid-template-columns: 1fr;
    }
}

/* Animal Media Section */
.animal-media {
    text-align: center;
}

.gif-container {
    position: relative;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    margin-bottom: 15px;
}

.animal-gif {
    width: 100%;
    height: 500px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.5s;
}

.animal-gif:hover {
    transform: scale(1.02);
}

/* Play Sound Large Button */
.play-sound-large {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(76, 175, 80, 0.9);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    border: 2px solid white;
}

.play-sound-large:hover {
    background: rgba(76, 175, 80, 1);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.instruction {
    text-align: center;
    color: var(--light-text);
    font-style: italic;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Animal Description */
.animal-description {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.description-card {
    background: #f8f9fa;
    border-radius: var(--border-radius-small);
    padding: 25px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    border-left: 5px solid var(--accent-color);
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.btn-explore,
.btn-quiz {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    border-radius: var(--border-radius-small);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    text-align: center;
    border: 3px solid transparent;
}

.btn-explore {
    background: var(--secondary-color);
    color: white;
}

.btn-explore:hover {
    background: #1976d2;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.btn-quiz {
    background: var(--accent-color);
    color: white;
}

.btn-quiz:hover {
    background: #e68900;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

/* Related Animals */
.related-animals {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 3px dashed #ddd;
}

.related-animals h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #333;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

.related-card {
    background: white;
    border-radius: var(--border-radius-small);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 3px solid transparent;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.related-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.related-card h4 {
    font-family: 'Fredoka One', cursive;
    margin: 10px 0;
    color: #333;
    font-size: 1.2rem;
}

.btn-small {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-small:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Back Home Button di Header */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
    border: 2px solid white;
    position: absolute;
    top: 20px;
    right: 20px;
}

.back-home:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}