:root {
    --bg-color: #f7f4fc;
    --primary-color: #6C48D3;
    --secondary-color: #e88dc6;
    --text-main: #2b2540;
    --text-muted: #6f678a;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 1);
    --glass-shadow: 0 8px 32px 0 rgba(108, 72, 211, 0.1);
    --cell-bg: #ffffff;
    --cell-active: rgba(108, 72, 211, 0.2);
    --cell-correct: rgba(46, 213, 115, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-color), transparent);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary-color), transparent);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #2E81D5, transparent);
    top: 40%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Layout */
.app-container {
    width: 100%;
    max-width: 1000px;
    padding: 5rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 1;
}

header {
    text-align: center;
}

/* PC Split Layout */
@media (min-width: 900px) {
    body {
        background: #ebe3fc;
    }

    .background-animation {
        width: 100vw;
    }

    .app-container {
        flex-direction: row;
        align-items: flex-start;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem;
        gap: 3rem;
    }
    
    header {
        flex: 1;
        position: sticky;
        top: 2rem;
        height: calc(100vh - 4rem);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .header-content {
        position: relative;
        max-width: 480px;
        width: 100%;
    }

    main {
        flex: 1.2;
        min-width: 0;
        background: #ffffff6b;
        border-radius: 20px;
        box-shadow: var(--glass-shadow);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid var(--glass-border);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 4rem 2rem;
    }

    .game-column, .clues-container {
        width: 100%;
        max-width: 650px;
    }
}

.header-image-container {
    text-align: center;
    margin: 0 auto 1.5rem auto;
    max-width: 600px;
    width: 100%;
    animation: floatTitleImg 4s ease-in-out infinite;
    transform-origin: center;
}

.header-title-img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0px 8px 12px rgba(108, 72, 211, 0.2));
}

@keyframes floatTitleImg {
    0%, 100% { transform: translateY(0) rotate(-1deg) scale(1); }
    50% { transform: translateY(-6px) rotate(1deg) scale(1.02); }
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.campaign-period-badge {
    background: #673ab7;
    color: #ffffff;
    padding: 0.6rem 1rem;
    font-size: 1.1rem;
    margin: 1.5rem auto 0;
    border: 2px dashed #673AB7;
    letter-spacing: 0.5px;
}

.mobile-break {
    display: none;
}

@media (max-width: 768px) {
    .mobile-break {
        display: block;
    }
}

.campaign-intro {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgb(255, 226, 57);
    border-radius: 16px;
    padding: 2.5rem 1.5rem 1.5rem;
    margin: 2.5rem auto 1rem;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(108, 72, 211, 0.1);
    backdrop-filter: blur(10px);
}

.campaign-badge {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FFEB3B, #FF9800);
    color: #fff;
    padding: 6px 24px;
    border-radius: 30px;
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(108, 72, 211, 0.3);
    white-space: nowrap;
    letter-spacing: 1px;
}

.campaign-title {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 0.8rem;
    font-weight: 900;
}

.highlight-gold {
    color: #d6336c;
    background: linear-gradient(transparent 70%, rgba(214, 51, 108, 0.2) 30%);
    padding: 0 4px;
}

.campaign-desc {
    font-size: 1rem;
    color: var(--text-muted) !important;
    line-height: 1.6;
    font-weight: 700;
}

.small-instruction {
    font-size: 0.85rem !important;
    color: #938ca8 !important;
    margin-top: 1rem;
    font-weight: bold;
}

main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}


.game-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    flex: 1;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
}

/* Crossword Grid */
.game-board {
    padding: 2rem;
    border-radius: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.crossword-grid {
    display: grid;
    /* Grid columns and rows will be set by JS */
    gap: 1px;
    margin: 0 auto;
    background-color: #d1c4e9;
    padding: 1px;
    border: 3px solid #d1c4e9;
    border-radius: 4px;
}

.cell-container {
    position: relative;
    width: 40px;
    height: 40px;
}

@media (min-width: 480px) {
    .cell-container {
        width: 48px;
        height: 48px;
    }
}

.cell-number {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    color: #555;
    z-index: 2;
    pointer-events: none;
}

.crossword-cell {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    border-radius: 0;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: #333;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    caret-color: transparent;
    cursor: pointer;
}

.crossword-cell:focus {
    outline: none;
    background: #e6ddff;
    box-shadow: inset 0 0 0 2px var(--primary-color);
    z-index: 10;
}

.crossword-cell.correct, .final-input.correct {
    background: #cffce1;
    animation: pop 0.4s ease forwards;
}

.crossword-cell.incorrect, .final-input.incorrect {
    color: #e74c3c;
    background-color: #ffeaea;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.crossword-cell.highlight-word {
    background: #f0ebff;
}

.empty-cell {
    background: #d1c4e9;
    border: none;
    pointer-events: none;
}

/* Clues */
.clues-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
    flex: 1.5; /* Takes up more space than game-column if space allows */
}

.clues-section {
    padding: 1.5rem;
    border-radius: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.clues-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.clues-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.clue-item {
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    overflow-wrap: break-word;
    word-break: break-word;
}

.clue-item:hover {
    background: rgba(108, 72, 211, 0.08);
}

.clue-item.active {
    background: rgba(108, 72, 211, 0.15);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
}

.clue-item.solved {
    color: #1eb55e;
    text-decoration: line-through;
    opacity: 0.7;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.4s ease;
    background: rgba(43, 30, 84, 0.5); /* Darken with a subtle purple tint */
    backdrop-filter: blur(6px); /* Blur the background */
    -webkit-backdrop-filter: blur(6px);
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    padding: 3rem 2rem;
    text-align: center;
    max-width: 95%;
    width: 600px;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.hidden .modal-content {
    transform: translateY(30px);
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.modal-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(108, 72, 211, 0.4);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 72, 211, 0.6);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* Final Answer Section */
.game-instruction {
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #e62e2d;
    font-weight: bold;
}

.final-answer-container {
    text-align: center;
    margin-bottom: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 480px;
}

.final-answer-container h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.final-answer-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.final-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.final-marker {
    font-size: 1rem;
    font-weight: 800;
    color: #e74c3c;
}

.final-input {
    width: 60px;
    height: 60px;
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: #fff;
    color: #333;
    text-transform: uppercase;
}

.final-input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(108, 72, 211, 0.5);
}

/* Target Markers in Grid */
.target-marker-label {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #e74c3c;
    z-index: 2;
    pointer-events: none;
}

/* Lucky Chance Modal */
.lucky-chance-modal {
    background: #fffbe6;
    border: 4px solid #fff;
    border-radius: 12px;
    padding: 0;
    max-width: 900px;
    width: 95%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: left;
    color: #333;
}

.lucky-header {
    background: #6a4c9c;
    position: relative;
    padding: 1.5rem 2rem 1.5rem 100px;
    display: flex;
    align-items: center;
    border-bottom: 5px solid #fff;
}

.lucky-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #e62e2d;
    color: #fff;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-weight: 900;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 3px dashed #ffcc00;
    transform: rotate(-10deg);
}

.lucky-title-area {
    color: #fff;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.3);
}

.lucky-subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.lucky-main-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffcc00;
    -webkit-text-stroke: 1px #333;
    letter-spacing: 2px;
}

.lucky-body {
    padding: 2rem;
    background: repeating-linear-gradient(
        -45deg,
        #fffbe6,
        #fffbe6 20px,
        #fcf5d2 20px,
        #fcf5d2 40px
    );
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.prize-card {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.prize-image-placeholder {
    height: 140px;
    background: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}

.prize-winners {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #fff;
    color: #d6336c;
    border: 2px solid #d6336c;
    border-radius: 8px;
    padding: 2px 8px;
    font-weight: bold;
    font-size: 0.8rem;
}

.prize-winners span {
    font-size: 1.4rem;
}

.prize-footer {
    background: #5b458c;
    color: #fff;
    text-align: center;
    padding: 0.8rem 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-description {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.8);
    padding: 1rem;
    border-radius: 8px;
}

.char-bubble {
    background: #ff87a3;
    color: #fff;
    font-weight: 900;
    padding: 1rem;
    border-radius: 50%;
    text-align: center;
    min-width: 100px;
    font-size: 0.9rem;
}

.character-description p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #333;
    font-weight: 600;
}

.web-banner {
    background: #fff;
    border: 3px solid #ddd;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}

.web-badge {
    position: absolute;
    top: -15px;
    left: -15px;
    background: #4a2e8e;
    color: #fff;
    padding: 15px;
    font-weight: bold;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    text-align: center;
    font-size: 0.9rem;
}

.web-banner-content {
    flex: 1;
    padding-left: 60px;
}

.web-banner-title {
    color: #d6336c;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.red-text {
    font-size: 2rem;
    color: #e62e2d;
}

.web-banner-desc {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: bold;
}

.quiz-box {
    display: flex;
    flex-direction: column;
    border: 3px solid #d6336c;
    border-radius: 8px;
    overflow: hidden;
}

.quiz-label {
    background: #d6336c;
    color: #fff;
    font-weight: bold;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.85rem;
    white-space: nowrap;
}

.quiz-label br {
    display: none;
}

@media (min-width: 600px) {
    .quiz-box {
        flex-direction: row;
    }
    .quiz-label br {
        display: inline;
    }
}

.quiz-text {
    padding: 0.5rem 1rem;
    background: #fff;
    font-weight: bold;
}

.quiz-q {
    font-size: 0.85rem;
    color: #666;
}

.quiz-a {
    font-size: 1.1rem;
    color: #333;
}

.web-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 160px;
}

.action-btn {
    width: 100%;
    padding: 1rem;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-secondary {
    background: #eee;
    color: #333;
    border: 2px solid #ccc;
}

@media (max-width: 768px) {
    .lucky-header {
        padding: 1rem 1rem 1rem 60px;
    }
    .lucky-badge {
        width: 80px;
        height: 80px;
        font-size: 0.7rem;
        top: -5px;
        left: -5px;
    }
    .lucky-main-title {
        font-size: 1.8rem;
    }
    .web-banner {
        flex-direction: column;
        padding-left: 1rem;
    }
    .web-banner-content {
        padding-left: 0;
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 5rem 0.5rem 1rem 0.5rem;
    }
    .header-image-container {
        width: 100%;
        max-width: 400px;
    }
    .game-board {
        padding: 0.5rem;
        border-radius: 12px;
    }
    .cell-container {
        /* Make cells dynamically fill the screen on mobile, 8 cols = ~11vw each */
        width: clamp(38px, 11vw, 46px);
        height: clamp(38px, 11vw, 46px);
    }
    .crossword-cell {
        font-size: clamp(1rem, 4vw, 1.2rem);
    }
    .cell-number {
        font-size: clamp(0.55rem, 2vw, 0.65rem);
        top: 1px;
        left: 2px;
    }
    .target-marker-label {
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
    }
    .game-column {
        gap: 0.5rem;
    }
    .final-answer-container {
        padding: 1rem 0.5rem;
        margin-bottom: 0;
    }
    .final-answer-inputs {
        gap: 1vw;
    }
    .final-input {
        width: clamp(30px, 11vw, 46px);
        height: clamp(30px, 11vw, 46px);
        font-size: clamp(1.2rem, 5vw, 1.5rem);
    }
    .modal-content {
        padding: 2rem 1rem;
    }
    .quiz-a {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }
    .quiz-label {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    .btn-primary {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0px #FFD700; border-color: var(--glass-border); transform: scale(1); }
    50% { box-shadow: 0 0 20px #FFD700; border-color: #FFD700; transform: scale(1.05); }
    100% { box-shadow: 0 0 0px #FFD700; border-color: var(--glass-border); transform: scale(1); }
}

.highlight-pulse {
    animation: pulseGlow 1s ease-in-out 3;
    z-index: 10;
    position: relative;
}

@keyframes containerPulseGlow {
    0% { box-shadow: 0 0 0px transparent; transform: scale(1); }
    50% { box-shadow: 0 0 45px #FFD700; transform: scale(1.02); border-color: #FFD700; }
    100% { box-shadow: 0 0 0px transparent; transform: scale(1); }
}

.highlight-pulse-container {
    animation: containerPulseGlow 1.2s ease-in-out 3;
    z-index: 10;
    position: relative;
}

.clue-hint-link {
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    background: rgba(108, 72, 211, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.clue-hint-link:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

.hint-icon {
    margin-right: 4px;
}

.blueberry-deco {
    position: absolute;
    font-size: 3rem;
    opacity: 0.7;
    user-select: none;
    pointer-events: none;
    animation: floatBerry 15s infinite ease-in-out alternate;
}
.deco-1 { top: 8%; left: 5%; animation-delay: 0s; width: 4.5rem; height: 4.5rem; }
.deco-2 { top: 15%; right: 8%; animation-delay: -2s; width: 3rem; height: 3rem; }
.deco-3 { bottom: 10%; left: 10%; animation-delay: -4s; width: 4rem; height: 4rem; }
.deco-4 { bottom: 25%; right: 5%; animation-delay: -6s; width: 3.5rem; height: 3.5rem; }
.deco-5 { top: 45%; left: 85%; animation-delay: -8s; width: 2.5rem; height: 2.5rem; }
.deco-6 { top: 60%; left: 15%; animation-delay: -1s; width: 3.2rem; height: 3.2rem; }
.deco-7 { top: 75%; right: 12%; animation-delay: -3s; width: 4.2rem; height: 4.2rem; }
.deco-8 { top: 35%; left: 30%; animation-delay: -5s; width: 2.8rem; height: 2.8rem; }
.deco-9 { top: 85%; left: 40%; animation-delay: -7s; width: 3.5rem; height: 3.5rem; }
.deco-10 { top: 20%; right: 35%; animation-delay: -9s; width: 4.8rem; height: 4.8rem; }

@media (max-width: 768px) {
    .deco-8 { left: -5%; top: 35%; }
    .deco-10 { right: 0%; top: 32%; }
    .deco-1 { left: -1%; top: 1%; }
    .deco-2 { right: 7%; top: 10%; }
    .deco-9 { left: 20%; }
}

@keyframes floatBerry {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 40px) rotate(15deg); }
}

/* =========================================
   Icon Images
========================================= */
.nav-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
}

.nav-footer-berry {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
}

.badge-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    vertical-align: middle;
}

.modal-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    vertical-align: middle;
}

.blueberry-deco img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =========================================
   Hamburger Menu & Navigation
========================================= */
.hamburger-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(108, 72, 211, 0.2);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-btn span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.hamburger-btn:hover {
    transform: scale(1.05);
}

.hamburger-btn.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Navigation backdrop overlay */
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(50, 30, 100, 0);
    z-index: 998;
    pointer-events: none;
    transition: background 0.4s ease;
}

.nav-backdrop.open {
    background: rgba(50, 30, 100, 0.35);
    pointer-events: all;
    backdrop-filter: blur(3px);
}

/* Navigation Menu Overlay */
.nav-menu {
    position: fixed;
    top: 0;
    right: -470px;
    width: 450px;
    max-width: 90vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: -8px 0 32px rgba(108, 72, 211, 0.18);
    z-index: 999;
    transition: right 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.45s ease;
    opacity: 0;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(16px);
}

.nav-menu.open {
    right: 0;
    opacity: 1;
}

/* Decorative nav header */
.nav-header-deco {
    background: transparent;
    padding: 2.5rem 1.5rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.nav-deco-berries {
    width: 64px;
    height: auto;
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.nav-title {
    color: var(--primary-color) !important;
    font-size: 1.6rem;
    margin-bottom: 0.3rem !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.nav-subtitle {
    color: #666666;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0;
}

/* Nav close button (repositioned for new header) */
.nav-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.nav-close-btn:hover {
    background: rgba(255,255,255,0.5);
    color: #673ab7;
    transform: rotate(90deg);
}

/* Nav footer */
.nav-footer-deco {
    padding: 1.2rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #673ab7;
    border-top: 2px dashed rgba(103, 58, 183, 0.2);
    background: rgba(103, 58, 183, 0.04);
    letter-spacing: 2px;
}

.nav-content {
    padding: 1.5rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}


.nav-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 800;
    border-bottom: 2px dashed rgba(108, 72, 211, 0.3);
    padding-bottom: 1rem;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Staggered slide-in for nav items */
.nav-list li {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.nav-menu.open .nav-list li:nth-child(1) { opacity: 1; transform: translateX(0); transition-delay: 0.15s; }
.nav-menu.open .nav-list li:nth-child(2) { opacity: 1; transform: translateX(0); transition-delay: 0.22s; }
.nav-menu.open .nav-list li:nth-child(3) { opacity: 1; transform: translateX(0); transition-delay: 0.29s; }
.nav-menu.open .nav-list li:nth-child(4) { opacity: 1; transform: translateX(0); transition-delay: 0.36s; }
.nav-menu.open .nav-list li:nth-child(5) { opacity: 1; transform: translateX(0); transition-delay: 0.43s; }

.nav-list li a {
    display: block;
    color: var(--text-color);
    font-size: 1.1rem;
    text-decoration: none;
    font-weight: 700;
    padding: 12px 15px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.nav-list li a:hover {
    background: rgba(108, 72, 211, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.nav-list li a.active {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(108, 72, 211, 0.3);
}

@media (max-width: 768px) {
    .nav-menu {
        width: 100vw;
        max-width: 100vw;
    }
}
