/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Quicksand', sans-serif;
}


body {
    background: linear-gradient(to bottom, #f5f1e8, #e8d9c7);
    color: #5a3921;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}


.container {
    max-width: 900px;
    width: 100%;
    background: rgba(255, 253, 245, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 30px rgba(90, 57, 33, 0.2);
    position: relative;
    overflow: hidden;
}


.coffee-bean {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.1;
    z-index: 0;
}


.bean-1 {
    top: -20px;
    right: -20px;
    transform: rotate(45deg);
}


.bean-2 {
    bottom: -30px;
    left: -30px;
    transform: rotate(-20deg);
}


.bean-3 {
    top: 40%;
    left: -30px;
    transform: rotate(15deg);
}


.bean-4 {
    bottom: 30%;
    right: -30px;
    transform: rotate(-10deg);
}


/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #d9b99b;
    position: relative;
    z-index: 1;
}


h1 {
    color: #8b4513;
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.2);
    font-weight: 700;
}


.slogan {
    color: #a67c52;
    font-style: italic;
    font-size: 1.2rem;
}


.back-btn {
    display: inline-block;
    margin-top: 10px;
    color: #8b4513;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    position: absolute;
    left: 0;
    top: 0;
    padding: 8px 15px;
    border-radius: 5px;
    background: rgba(139, 69, 19, 0.1);
}


.back-btn:hover {
    color: #6b3403;
    background: rgba(139, 69, 19, 0.2);
    text-decoration: none;
}


/* Home Page Styles */
.home-main {
    text-align: center;
    position: relative;
    z-index: 1;
}


.categories {
    margin-bottom: 40px;
    text-align: center;
}


.categories h2 {
    margin-bottom: 25px;
    color: #8b4513;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}


.categories h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: #8b4513;
    border-radius: 3px;
}


.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}


.category-card {
    padding: 25px 20px;
    background: linear-gradient(to bottom, #e8d9c7, #d9b99b);
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(90, 57, 33, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #d9b99b;
    text-align: center;
    position: relative;
    overflow: hidden;
}


.category-card > * {
    position: relative;
    z-index: 1;
}


.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(90, 57, 33, 0.25);
}


.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #8b4513;
}


.category-card h3 {
    color: #8b4513;
    margin-bottom: 8px;
    font-size: 1.3rem;
}


.category-card p {
    color: #5a3921;
    font-size: 1rem;
    line-height: 1.4;
}


.description {
    margin-bottom: 40px;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #5a3921;
    background: #f5f1e8;
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid #8b4513;
    position: relative;
    text-align: center;
}


.description:before {
    content: '"';
    font-size: 4rem;
    color: #d9b99b;
    position: absolute;
    top: -10px;
    left: 10px;
    font-family: serif;
}


.actions {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}


.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}


.btn-play {
    background: linear-gradient(to right, #8b4513, #a67c52);
    color: white;
}


.btn-about {
    background: linear-gradient(to right, #a67c52, #c19a6b);
    color: white;
}


.btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(90, 57, 33, 0.4);
}


.audio-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}


.audio-btn {
    padding: 10px 15px;
    background: #d9b99b;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 14px;
    opacity: 0.8;
}


.audio-btn.active {
    background: #8b4513;
    color: white;
    opacity: 1;
}


.audio-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
}


/* Quiz Page Styles */
.quiz-main {
    text-align: center;
    position: relative;
    z-index: 1;
}


.progress-container {
    margin: 25px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.coffee-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}


.coffee-cup {
    width: 70px;
    height: 80px;
    background: #a67c52;
    border-radius: 0 0 20px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}


.coffee-liquid {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, #4e3524, #8b4513);
    transition: height 0.8s ease;
    border-radius: 0 0 20px 20px;
}


.progress-text {
    font-weight: bold;
    font-size: 1.4rem;
    color: #8b4513;
    background: #f5f1e8;
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(90, 57, 33, 0.2);
}


.timer-container {
    margin-top: 15px;
}


.timer-circle {
    width: 80px;
    height: 80px;
    position: relative;
}


.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}


.timer-circle-bg {
    fill: none;
    stroke: #f5f1e8;
    stroke-width: 6;
}


.timer-circle-progress {
    fill: none;
    stroke: #8b4513;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}


.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: #8b4513;
}


.level-indicator {
    background: linear-gradient(to right, #8b4513, #a67c52);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 25px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}


#question {
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: #8b4513;
    line-height: 1.5;
    background: #f5f1e8;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(90, 57, 33, 0.1);
    position: relative;
}


#question:before {
    content: '?';
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: #8b4513;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(139, 69, 19, 0.3);
}


#options-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}


.option-btn {
    padding: 18px;
    border: 2px solid #d9b99b;
    border-radius: 12px;
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #5a3921;
    text-align: left;
    position: relative;
    overflow: hidden;
}


.option-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: #d9b99b;
    transition: width 0.3s ease;
}


.option-btn:hover {
    background: #f5f1e8;
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(90, 57, 33, 0.15);
    border-color: #a67c52;
}


.option-btn:hover:before {
    width: 10px;
    background: #8b4513;
}


.option-btn.correct {
    background: #e8f5e9;
    border-color: #66bb6a;
    color: #2e7d32;
}


.option-btn.correct:before {
    background: #66bb6a;
    width: 10px;
}


.option-btn.wrong {
    background: #ffebee;
    border-color: #ef5350;
    color: #c62828;
}


.option-btn.wrong:before {
    background: #ef5350;
    width: 10px;
}


/* ========== PERBAIKAN UTAMA: FIX UNTUK JOKE CONTAINER ========== */
/* Fix untuk transisi elemen kuis */
#question-container, #options-container, #joke-container, #results-container {
    transition: opacity 0.3s ease, transform 0.3s ease;
}


#question-container.hidden, #options-container.hidden {
    display: none;
    opacity: 0;
    height: 0;
    overflow: hidden;
}


#question-container:not(.hidden), #options-container:not(.hidden) {
     display: block;
    opacity: 1;
    height: auto;
}


#joke-container {
    opacity: 0;
    transform: translateY(20px);
    display: none;
    margin: 25px 0;
    padding: 20px;
    background: #fffde7;
    border-radius: 12px;
    border-left: 5px solid #ffd54f;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}


#joke-container.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
    max-height: 200px;
    animation: fadeIn 0.5s ease;
}


#joke-text {
    font-style: italic;
    color: #8b4513;
    font-size: 1.1rem;
    line-height: 1.5;
}


#results-container {
    opacity: 0;
    transform: scale(0.9);
    display: none;
    margin-top: 40px;
    padding: 30px;
    background: #f5f1e8;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(90, 57, 33, 0.1);
}


#results-container:not(.hidden) {
    opacity: 1;
    transform: scale(1);
    display: block;
    animation: fadeIn 0.5s ease;
}
/* ========== END OF PERBAIKAN ========== */


/* Results Page Styles */
#result-title {
    color: #8b4513;
    margin-bottom: 20px;
    font-size: 2rem;
}


.score-display {
    font-size: 3rem;
    font-weight: bold;
    color: #8b4513;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}


#score-value {
    color: #8b4513;
    font-size: 4rem;
}


#total-questions {
    color: #a67c52;
    font-size: 2.5rem;
}


#result-message {
    margin-bottom: 30px;
    font-size: 1.3rem;
    line-height: 1.6;
    color: #5a3921;
}


.result-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}


.audio-controls-quiz {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}


/* About Page Styles */
.about-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    z-index: 1;
}


.creators-section {
    width: 100%;
}


.creators-section h2 {
    text-align: center;
    color: #8b4513;
    margin-bottom: 30px;
    font-size: 2rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}


.creators-section h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #8b4513;
    border-radius: 3px;
}


.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}


.creator-card {
    padding: 30px;
    background: linear-gradient(to bottom, #e8d9c7, #d9b99b);
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(90, 57, 33, 0.15);
    border: 2px solid #d9b99b;
    text-align: center;
    transition: transform 0.3s ease;
}


.creator-card:hover {
    transform: translateY(-5px);
}


.creator-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 5px solid #8b4513;
    box-shadow: 0 8px 16px rgba(90, 57, 33, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #a67c52, #8b4513);
    color: white;
    font-size: 3rem;
}


.creator-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.photo-placeholder {
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
}


.creator-card h3 {
    color: #8b4513;
    margin-bottom: 10px;
    font-size: 1.5rem;
}


.creator-role {
    color: #a67c52;
    font-style: italic;
    margin-bottom: 15px;
    font-size: 1.1rem;
}


.creator-description {
    margin-bottom: 20px;
}


.creator-description p {
    line-height: 1.6;
    color: #5a3921;
    text-align: justify;
}


.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}


.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}


.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


.social-link.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.social-link.tiktok {
    background: #000000;
}
.social-link.youtube {
    background: #FF0000;
}
.social-link.facebook {
    background: #3b5998;
}
.social-link.whatsapp {
    background: #25D366;
}


.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}


.about-section {
    padding: 25px;
    background: #f5f1e8;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(90, 57, 33, 0.1);
}


.about-section h3 {
    color: #8b4513;
    margin-bottom: 15px;
    font-size: 1.4rem;
    position: relative;
    padding-left: 20px;
}


.about-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 25px;
    background: #8b4513;
    border-radius: 4px;
}


.about-section p, .about-section li {
    line-height: 1.6;
    color: #5a3921;
}


.about-section ul {
    list-style: none;
    padding: 0;
}


.about-section li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}


.about-section li i {
    color: #8b4513;
    font-size: 1.2rem;
}


.contact-info p {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}


.contact-info i {
    width: 25px;
    color: #8b4513;
    font-size: 1.3rem;
}


/* Background untuk halaman berbeda */
.home-background {
    background-size: cover;
    position: relative;
}


.home-background::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}


.quiz-background {
    background-size: cover;
    position: relative;
}


.quiz-background::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}


.about-background {
    background-size: cover;
    position: relative;
}


.about-background::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}


.home-background .container,
.quiz-background .container,
.about-background .container {
    background: rgba(255, 253, 245, 0.92);
    backdrop-filter: blur(5px);
}


/* Utility Classes */
.hidden {
    display: none !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes cricket {
    0% { transform: translateX(0); }
    25% { transform: translateX(5px); }
    50% { transform: translateX(0); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}


@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}


@keyframes timerWarning {
    0% { background-color: #8b4513; }
    50% { background-color: #ff6b6b; }
    100% { background-color: #8b4513; }
}


.cricket-animation {
    animation: cricket 0.5s infinite;
}


.timer-warning {
    animation: timerWarning 1s infinite;
}


.pulse {
    animation: pulse 0.5s;
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        border-radius: 15px;
    }
   
    h1 {
        font-size: 2.2rem;
    }
   
    .category-grid {
        grid-template-columns: 1fr;
    }
   
    .actions {
        flex-direction: column;
        align-items: center;
    }
   
    .about-main {
        flex-direction: column;
        align-items: center;
    }
   
    .creator-card {
        width: 100%;
    }
   
    .coffee-cup {
        width: 60px;
        height: 70px;
    }
   
    #question {
        font-size: 1.3rem;
        padding: 15px;
    }
   
    .option-btn {
        padding: 15px;
        font-size: 1.1rem;
    }
   
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
   
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
   
    .audio-controls, .audio-controls-quiz {
        flex-direction: column;
    }
   
    .timer-circle {
        width: 60px;
        height: 60px;
    }
   
    .timer-text {
        font-size: 1.2rem;
    }
   
    .back-btn {
        position: relative;
        margin-bottom: 15px;
        left: 0;
        top: 0;
    }
   
    .creators-grid {
        grid-template-columns: 1fr;
    }
   
    .about-content {
        grid-template-columns: 1fr;
    }
   
    .score-display {
        flex-direction: column;
        gap: 5px;
    }
   
    .creator-description p {
        text-align: left;
    }
   
    .audio-controls-quiz {
        bottom: 10px;
        right: 10px;
    }
   
    .audio-btn {
        padding: 8px 12px;
        font-size: 12px;
    }


    /* Fix untuk joke container di mobile */
    #joke-container {
        margin: 15px 0;
        padding: 15px;
    }
   
    #joke-container.visible {
        max-height: 150px;
    }
   
    #joke-text {
        font-size: 1rem;
    }
   
    /* Fix untuk progress text di mobile */
    .progress-text {
        font-size: 1.2rem;
        padding: 3px 10px;
    }
   
    /* Fix untuk level indicator di mobile */
    .level-indicator {
        font-size: 0.9rem;
        padding: 8px 15px;
        margin-bottom: 15px;
    }
}

