/**
 * hanoi.css - Tower of Hanoi game styles
 */

/* ======== KEYFRAMES ======== */
@keyframes wobble {
    0%, 100% { transform: rotate(-5deg); }
    25%, 75% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
}

@keyframes spinStars {
    0% { transform: translateX(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}

@keyframes towerLaugh {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px) rotate(-2deg); }
    40%, 80% { transform: translateX(5px) rotate(2deg); }
}

@keyframes hanoi-floatUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    50% { opacity: 1; transform: translateY(-50px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-100px) scale(1.5); }
}

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

@keyframes highlightPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
}

@keyframes hanoi_starPop {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

/* ======== EASTER EGG & POLISH KEYFRAMES ======== */
@keyframes hanoi_goldFlash {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.8) saturate(1.5); background: linear-gradient(to bottom, gold, #d4af37) !important; }
}

@keyframes hanoi_fireRise {
    0% { opacity: 0; transform: translate(-50%, 0) scale(0.5); }
    20% { opacity: 1; transform: translate(-50%, -30px) scale(1.2); }
    80% { opacity: 1; transform: translate(-50%, -80px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -120px) scale(0.8); }
}

@keyframes hanoi_rainbowShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes hanoi_polePulse {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(180deg) brightness(1.3); }
}

@keyframes hanoi_discoBallSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes hanoi_scrollUnfurl {
    0% { transform: translateX(-50%) scaleY(0); opacity: 0; }
    30% { transform: translateX(-50%) scaleY(1); opacity: 1; }
    80% { transform: translateX(-50%) scaleY(1); opacity: 1; }
    100% { transform: translateX(-50%) scaleY(0); opacity: 0; }
}

@keyframes hanoi_monkAppear {
    0% { opacity: 0; transform: translateY(20px); }
    20% { opacity: 1; transform: translateY(0); }
    50% { transform: translateY(0) rotate(-5deg); }
    60% { transform: translateY(0) rotate(5deg); }
    70% { transform: translateY(0) rotate(0deg); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

@keyframes hanoi_particleDrop {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(50px); }
}

@keyframes hanoi_shakeWobble {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    20% { transform: translateX(-8px) rotate(-2deg); }
    40% { transform: translateX(8px) rotate(2deg); }
    60% { transform: translateX(-5px) rotate(-1deg); }
    80% { transform: translateX(5px) rotate(1deg); }
}

@keyframes hanoi_diskBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ======== EASTER EGG CSS CLASSES ======== */
.hanoi_gold-flash .disk {
    animation: hanoi_goldFlash 0.3s ease 6;
}

.hanoi_fire-text {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, 0);
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(to top, #ff4500, #ff8c00, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.8);
    animation: hanoi_fireRise 2s ease forwards;
    z-index: 9999;
    pointer-events: none;
}

.hanoi_disco-mode .disk {
    animation: hanoi_rainbowShift 0.5s linear infinite;
}

.hanoi_disco-mode .tower-pole {
    animation: hanoi_polePulse 0.3s ease infinite;
    background: linear-gradient(to right, #ff6b6b, #feca57, #48dbfb) !important;
}

.hanoi_disco-ball {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    animation: hanoi_discoBallSpin 1s linear infinite;
    z-index: 9999;
    pointer-events: none;
}

.hanoi_wisdom-scroll {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, #f5deb3, #deb887);
    border: 3px solid #8B4513;
    border-radius: 10px;
    padding: 25px 40px;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: hanoi_scrollUnfurl 4s ease forwards;
    z-index: 9999;
    transform-origin: top center;
}

.hanoi_wisdom-scroll p {
    font-family: 'Georgia', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: #4a3728;
    margin: 0;
}

.hanoi_monk {
    position: fixed;
    bottom: 20%;
    right: 15%;
    font-size: 5rem;
    animation: hanoi_monkAppear 3s ease forwards;
    z-index: 9999;
    pointer-events: none;
}

.hanoi_monk-text {
    position: fixed;
    bottom: calc(20% + 100px);
    right: 10%;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 15px;
    font-family: 'Georgia', serif;
    font-style: italic;
    color: #4a3728;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: hanoi_monkAppear 3s ease forwards;
    z-index: 9999;
}

.hanoi_shake-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #8B4513;
    border-radius: 50%;
    animation: hanoi_particleDrop 1s ease forwards;
    z-index: 100;
    pointer-events: none;
}

.tower.hanoi_shaking {
    animation: hanoi_shakeWobble 0.2s ease 5;
}

.tower.hanoi_shaking .disk {
    animation: hanoi_diskBounce 0.2s ease 5;
}

/* ======== POLISH: ENHANCED DISK HOVER ======== */
.disk.top-disk:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* ======== POLISH: DROP TARGET GLOW (enhanced) ======== */
.tower.drop-target .tower-base {
    background: linear-gradient(to bottom, gold, #d4af37);
    animation: highlightPulse 0.5s ease infinite;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.3);
}

.tower.drop-target .tower-pole {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* ======== WORLD THEMES ======== */
body.hanoi_world_dawn {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #ffeaa7 100%);
}
body.hanoi_world_dawn .tower-pole {
    background: linear-gradient(to right, #b87333, #8B5E3C, #b87333);
}
body.hanoi_world_dawn .tower-base {
    background: linear-gradient(to bottom, #b87333, #8B5E3C);
}
body.hanoi_world_dawn .info-label {
    color: #d35400;
}
body.hanoi_world_dawn .instructions h3 {
    color: #d35400;
}

body.hanoi_world_noon {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #ffecd2 100%);
}
body.hanoi_world_noon .tower-pole {
    background: linear-gradient(to right, #95a5a6, #7f8c8d, #95a5a6);
}
body.hanoi_world_noon .tower-base {
    background: linear-gradient(to bottom, #95a5a6, #7f8c8d);
}
body.hanoi_world_noon .info-label {
    color: #2980b9;
}
body.hanoi_world_noon .instructions h3 {
    color: #2980b9;
}

body.hanoi_world_twilight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}
body.hanoi_world_twilight .tower-pole {
    background: linear-gradient(to right, #2c3e50, #1a252f, #2c3e50);
}
body.hanoi_world_twilight .tower-base {
    background: linear-gradient(to bottom, #2c3e50, #1a252f);
}

/* ======== PLAY MODE TOGGLE ======== */
#hanoi_playModeToggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.hanoi_mode-btn {
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid white;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.hanoi_mode-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hanoi_mode-btn.active {
    background: white;
    color: #667eea;
}

/* ======== LEVEL SELECTOR ======== */
#hanoi_levelSelector {
    display: none;
    max-width: 800px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#hanoi_worldTabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hanoi_world-tab {
    padding: 10px 20px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    font-weight: bold;
    transition: all 0.2s;
}

.hanoi_world-tab:hover {
    background: rgba(102, 126, 234, 0.3);
}

.hanoi_world-tab.active {
    background: #667eea;
    color: white;
}

.hanoi_world-tab.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

#hanoi_levelGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.hanoi_level-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.hanoi_level-card:hover:not(.locked) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.hanoi_level-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.hanoi_level-card.current {
    border-color: #667eea;
}

.hanoi_level-card .level-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.hanoi_level-card.locked .level-number {
    color: #999;
}

.hanoi_level-card .level-name {
    margin: 5px 0;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
}

.hanoi_level-card .level-stars {
    font-size: 1.2rem;
    margin: 5px 0;
}

.hanoi_level-card .level-info {
    font-size: 0.75rem;
    color: #666;
}

.hanoi_level-card .level-lock {
    font-size: 2rem;
    margin: 10px 0;
}

/* ======== LEVEL INFO BAR ======== */
#hanoi_levelInfoBar {
    display: none;
    max-width: 800px;
    margin: 0 auto 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 10px 20px;
    text-align: center;
}

.hanoi_level-title {
    color: #667eea;
    font-weight: bold;
    font-size: 1.1rem;
}

.hanoi_level-subtitle {
    color: #666;
    font-size: 0.9rem;
}

#hanoi_backToLevelsBtn {
    margin-left: 15px;
    padding: 5px 15px;
    font-size: 0.9rem;
    border: none;
    border-radius: 15px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

#hanoi_backToLevelsBtn:hover {
    background: #5567d5;
}

/* ======== LEVEL COMPLETION STARS ======== */
#hanoi_levelStars {
    display: none;
    margin: 15px 0;
}

.hanoi_star {
    font-size: 3rem;
    display: inline-block;
    opacity: 0;
    transform: scale(0);
}

.hanoi_star.earned {
    animation: hanoi_starPop 0.4s ease forwards;
}

.hanoi_star.empty {
    animation: hanoi_starPop 0.4s ease forwards;
    filter: grayscale(100%);
    opacity: 0.4;
}

.hanoi_star:nth-child(1) { animation-delay: 0.1s; }
.hanoi_star:nth-child(2) { animation-delay: 0.3s; }
.hanoi_star:nth-child(3) { animation-delay: 0.5s; }

#hanoi_newBest {
    display: none;
    color: gold;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 10px 0;
}

#hanoi_levelButtons {
    display: none;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.hanoi_level-btn {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

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

#hanoi_retryBtn {
    background: #ff9800;
    color: white;
}

#hanoi_nextLevelBtn {
    background: #4CAF50;
    color: white;
}

#hanoi_levelBackBtn {
    background: white;
    color: #667eea;
}

/* ======== BASE STYLES (overrides game-common.css) ======== */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    overflow-x: hidden;
}

/* ======== HEADER (overrides game-common.css) ======== */
.header {
    max-width: 800px;
    margin: 0 auto 15px;
    padding: 0 10px;
}

h1 {
    font-size: 2rem;
}

.header-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.leaderboard-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.leaderboard-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.back-link {
    color: white;
    font-size: 1.1rem;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: background 0.2s;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ======== GAME INFO ======== */
.game-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.info-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.info-label {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.info-value {
    color: #333;
    font-size: 1.8rem;
    font-weight: bold;
}

/* ======== DIFFICULTY & CONTROLS ======== */
.difficulty {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.difficulty select {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.control-btn {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.control-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-new {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-reset {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.btn-solve {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

/* ======== GAME CONTAINER ======== */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
}

.towers-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    min-height: 280px;
    padding: 20px 10px;
}

/* ======== TOWERS ======== */
.tower {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
    position: relative;
}

.tower.laughing {
    animation: towerLaugh 0.5s ease;
}

.tower-pole {
    width: 15px;
    height: 180px;
    background: linear-gradient(to right, #8B4513, #654321, #8B4513);
    border-radius: 8px 8px 0 0;
    position: relative;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
}

.disks-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
}

.tower-base {
    width: 100%;
    max-width: 180px;
    height: 15px;
    background: linear-gradient(to bottom, #8B4513, #654321);
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.tower-label {
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* ======== DISKS ======== */
.disk {
    height: 25px;
    border-radius: 12px;
    margin-bottom: 2px;
    cursor: default;
    transition: transform 0.1s;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    touch-action: none;
    user-select: none;
}

.disk.top-disk {
    cursor: grab;
}

.disk.top-disk:hover {
    transform: translateY(-3px);
}

.disk.dragging {
    position: fixed;
    z-index: 1000;
    cursor: grabbing;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.disk.wobbling {
    animation: wobble 0.3s ease infinite;
}

.disk-stars {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    white-space: nowrap;
    animation: spinStars 1s linear infinite;
    pointer-events: none;
}

/* ======== DROP TARGETS ======== */
.tower.drop-target .tower-base {
    background: linear-gradient(to bottom, gold, #d4af37);
    animation: highlightPulse 0.5s ease infinite;
}

.tower.invalid-target .tower-base {
    background: linear-gradient(to bottom, #f44336, #c62828);
}

/* ======== HA HA HA TEXT ======== */
.laugh-text {
    position: fixed;
    font-size: 2rem;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    animation: hanoi-floatUp 2s ease-out forwards;
    z-index: 2000;
}

/* ======== INSTRUCTIONS ======== */
.instructions {
    max-width: 800px;
    margin: 20px auto 0;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.instructions h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.instructions p {
    color: #555;
    line-height: 1.6;
}

/* ======== WIN OVERLAY ======== */
#winMessage {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 5000;
}

.win-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: bounceIn 0.5s ease forwards;
}

.win-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.win-content .trophy {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
}

.win-content .moves-result {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.win-content .perfect {
    color: gold;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.win-content .rank-display {
    color: #ffd700;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.win-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.win-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.win-btn.play-again {
    background: #4CAF50;
    color: white;
}

.win-btn.view-leaderboard {
    background: white;
    color: #667eea;
}

/* ======== TIMER & MODE STYLES ======== */
.hanoi_timer-box.hanoi_warning .info-value {
    color: #ff9800;
}

.hanoi_timer-box.hanoi_critical .info-value {
    color: #f44336;
    font-weight: bold;
}

.hanoi_medal {
    font-size: 3rem;
    display: block;
    margin: 10px 0;
}

.hanoi_time-result {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* ======== FAIL OVERLAY ======== */
#hanoi_failMessage {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 5000;
}

.hanoi_fail-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #c62828 0%, #8e0000 100%);
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: bounceIn 0.5s ease forwards;
}

.hanoi_fail-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hanoi_fail-content .fail-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
}

.hanoi_fail-content .fail-stats {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* ======== CYCLIC VARIANT STYLES ======== */
.hanoi_cyclic-indicator {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2d1f3d 0%, #1a1a2e 100%);
    border-radius: 20px;
    margin: 10px auto;
    width: fit-content;
    font-size: 1.1em;
    border: 2px solid #9b59b6;
}

.hanoi_cyclic-indicator.active {
    display: flex;
}

.hanoi_cyclic-indicator .hanoi_tower-label {
    font-weight: bold;
    color: #f39c12;
}

.hanoi_cyclic-indicator .hanoi_arrow {
    color: #9b59b6;
    font-size: 1.2em;
}

.tower.hanoi_valid-target .tower-base {
    background: linear-gradient(to bottom, #2ecc71, #27ae60);
    animation: highlightPulse 0.5s ease infinite;
}

.tower.hanoi_invalid-target .tower-base {
    background: linear-gradient(to bottom, #95a5a6, #7f8c8d);
}

.tower.hanoi_invalid-target {
    opacity: 0.5;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
    }

    .game-info {
        gap: 15px;
    }

    .info-box {
        padding: 8px 15px;
    }

    .info-value {
        font-size: 1.4rem;
    }

    .difficulty {
        gap: 8px;
    }

    .control-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .tower-pole {
        width: 12px;
        height: 140px;
    }

    .disk {
        height: 20px;
    }

    .towers-container {
        min-height: 220px;
    }

    .win-content {
        padding: 25px;
        width: 90%;
    }

    .win-content h2 {
        font-size: 1.8rem;
    }

    #hanoi_levelGrid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hanoi_level-card {
        padding: 10px;
    }

    .hanoi_level-card .level-number {
        font-size: 1.2rem;
    }

    .hanoi_mode-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .hanoi_star {
        font-size: 2.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
