/* --- MOBILE FIRST BRANDING & RESET --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #1a080a; /* Màu đỏ sẫm cung đình huyền bí */
    background-image: 
        radial-gradient(rgba(255, 215, 0, 0.08) 2px, transparent 0),
        linear-gradient(rgba(26, 8, 10, 0.95), rgba(80, 8, 12, 0.95));
    background-size: 30px 30px, 100% 100%;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive, sans-serif;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 12px;
    overflow: hidden;
    position: relative;
}

/* --- RỒNG BAY PHƯỢNG MÚA ANIMATIONS --- */
.mythical-creature {
    position: absolute;
    font-size: 64px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
}

.dragon {
    left: 5%;
    top: 10%;
    animation: dragon-fly 10s ease-in-out infinite alternate;
}

.phoenix {
    right: 5%;
    bottom: 10%;
    animation: phoenix-fly 8s ease-in-out infinite alternate;
}

/* Các hạt lấp lánh tự phát sáng bay lơ lửng */
.sparkle {
    position: absolute;
    font-size: 20px;
    pointer-events: none;
    z-index: 1;
    animation: sparkle-glow 2s infinite ease-in-out alternate;
}

@keyframes dragon-fly {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(30px, -50px) scale(1.1) rotate(10deg); }
    100% { transform: translate(-20px, 60px) scale(0.9) rotate(-10deg); }
}

@keyframes phoenix-fly {
    0% { transform: translate(0, 0) scale(1) rotate(0deg) scaleX(-1); }
    50% { transform: translate(-40px, 40px) scale(1.15) rotate(-15deg) scaleX(-1); }
    100% { transform: translate(20px, -30px) scale(0.9) rotate(15deg) scaleX(-1); }
}

@keyframes sparkle-glow {
    0% { opacity: 0.2; transform: scale(0.8) translateY(0); }
    100% { opacity: 1; transform: scale(1.3) translateY(-10px); }
}

/* Base Container: Hoàng gia quý phái */
.jollibee-container {
    background: #50080c; /* Nền đỏ đậm hoàng tộc */
    border: 5px solid #ffd700; /* Viền vàng hoàng kim */
    border-radius: 20px;
    padding: 18px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0px 0px 30px rgba(255, 215, 0, 0.4), inset 0 0 20px rgba(255, 215, 0, 0.2);
    position: relative;
    z-index: 10;
    box-sizing: border-box;
    transition: max-width 0.3s ease;
}

/* Header Rồng Bay Phượng Múa */
.brand-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-bottom: 3px double #ffd700;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.brand-title {
    font-size: 18px;
    font-weight: 900;
    margin: 0;
    text-align: center;
}

.royal-gold {
    background: linear-gradient(45deg, #ffd700, #fff3a0, #ffd700, #ffaa00);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gold-shine 3s linear infinite;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.bee-emoji {
    font-size: 24px;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
    animation: wiggle 0.5s infinite alternate;
}

.award-banner {
    font-size: 10px;
    font-weight: bold;
    color: #ffd700;
    text-align: center;
    margin: 4px 0 12px 0;
    text-shadow: 0 0 5px rgba(255,215,0,0.5);
}

/* Layout chính: Mobile hiển thị dọc */
.main-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Thẻ nhân viên / Poster */
.poster-card {
    background: #6a0d13;
    border-radius: 12px;
    padding: 12px;
}

.royal-border {
    border: 3px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-title {
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.gold-text {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.img-frame {
    width: 100%;
    max-width: 180px;
    border: 3.5px solid #ffd700;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    position: relative;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

#subject-photo {
    width: 100%;
    display: block;
    filter: contrast(1.1) brightness(0.95);
    transition: transform 0.1s ease, filter 0.5s ease;
}

#subject-photo.sad-mode {
    filter: grayscale(1) contrast(0.8) brightness(0.7);
}

/* Con dấu tịch thu */
.confiscated-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(3) rotate(-20deg);
    color: #ff3333;
    border: 3.5px double #ff3333;
    background: rgba(26, 8, 10, 0.95);
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 0 15px rgba(255,0,0,0.6);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.confiscated-stamp.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(-15deg);
}

.employee-title {
    margin-top: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.4);
}

/* Sớ trạng kỷ lục */
.achievements-box {
    padding: 10px;
    margin-bottom: 12px;
    text-align: left;
    border-radius: 8px;
}

.royal-bg {
    background: #6a0d13;
    border: 2px dashed #ffd700;
}

.achievements-box h3 {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: #ffd700;
    border-bottom: 1px solid #ffd700;
    padding-bottom: 2px;
}

.achievements-box ul {
    margin: 0;
    padding-left: 14px;
    font-size: 11px;
    line-height: 1.5;
}

.achievements-box li {
    margin-bottom: 6px;
}

/* Slider */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #ffd700;
}

.slider-group input {
    cursor: pointer;
    accent-color: #ffd700;
    height: 8px;
}

/* Khu vực nút tương tác di động */
.action-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    align-items: center;
}

.btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    padding: 12px 10px;
    border: 3px solid #ffd700;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 4px 4px 0px #ffd700;
    width: 100%;
    text-align: center;
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #ffd700;
}

.btn-raise {
    background: #ffd700;
    color: #50080c;
    position: relative;
    z-index: 100;
    max-width: 220px;
    align-self: center;
}

.btn-fire {
    background: #d11218;
    color: white;
    border-color: #ff4d4d;
    box-shadow: 4px 4px 0px #ff4d4d;
}

.btn-fire:active {
    box-shadow: 2px 2px 0px #ff4d4d;
}

.troll-hint {
    font-size: 9px;
    color: #ffd700;
    opacity: 0.7;
    margin-top: 12px;
    text-align: center;
    font-style: italic;
}

/* --- DESKTOP & TABLET RESPONSIVE LAYOUT (min-width: 768px) --- */
@media (min-width: 768px) {
    body {
        padding: 24px;
    }

    .jollibee-container {
        padding: 24px;
        max-width: 760px;
        border-width: 5px;
        box-shadow: 0px 0px 40px rgba(255, 215, 0, 0.5), 8px 8px 0px #ffd700;
    }

    .brand-title {
        font-size: 26px;
    }

    .bee-emoji {
        font-size: 32px;
    }

    .award-banner {
        font-size: 13px;
    }

    /* 2 cột song song */
    .main-layout {
        flex-direction: row;
        gap: 24px;
        align-items: stretch;
    }

    .left-column {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .right-column {
        flex: 1.2;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .poster-card {
        padding: 20px 16px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .badge-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .img-frame {
        max-width: 200px;
    }

    .employee-title {
        font-size: 16px;
        margin-top: 12px;
    }

    .achievements-box {
        padding: 16px;
        margin-bottom: 0;
    }

    .achievements-box h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .achievements-box ul {
        font-size: 12px;
        line-height: 1.6;
    }

    .action-area {
        flex-direction: row;
        gap: 12px;
        justify-content: center;
    }

    .btn {
        padding: 12px 15px;
        max-width: 220px;
    }
}

/* Animations */
@keyframes wiggle {
    0% { transform: rotate(-10deg); }
    100% { transform: rotate(10deg); }
}

@keyframes gold-shine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.earthquake {
    animation: shake 0.1s infinite;
}

@keyframes shake {
    0% { transform: translate(2px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(0px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(2px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(2px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* --- BANNER TỰ HỦY --- */
.destruct-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #d11218, #80080c, #d11218);
    border-bottom: 3px solid #ffd700;
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    font-weight: bold;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(209, 18, 24, 0.4);
    letter-spacing: 0.5px;
}

.destruct-banner .timer-digits {
    color: #ffd700;
    font-family: monospace;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    text-shadow: 0 0 5px #ffd700;
}

/* --- LOCK OVERLAY --- */
.lock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 8, 10, 0.98);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none; /* Hiện lên bằng JS */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lock-overlay.active {
    display: flex;
    animation: fadeIn 0.5s ease forwards;
}

.lock-card {
    background: #50080c;
    max-width: 400px;
    width: 100%;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.lock-header {
    margin-bottom: 20px;
}

.lock-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
    animation: pulse 1s infinite alternate;
}

.lock-card h2 {
    color: #ffd700;
    font-size: 20px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.lock-desc {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: #f0e6e6;
}

.lock-card .gold-btn {
    background: #ffd700;
    color: #50080c;
    box-shadow: 4px 4px 0 #b39600;
    border-color: #ffd700;
}

.lock-card .gold-btn:hover {
    background: #fff;
    color: #50080c;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

/* Adjust body padding for banner */
body {
    padding-top: 50px !important;
}

