/* ===== HOGWARTS PLANNER - BRIGHT & CHEERFUL THEME ===== */

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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: 
        /* Mystical Hogwarts overlay */
        linear-gradient(135deg, rgba(44, 27, 71, 0.75) 0%, rgba(26, 35, 126, 0.7) 50%, rgba(61, 43, 92, 0.75) 100%),
        /* Hogwarts Castle Background */
        url('https://images.unsplash.com/photo-1595769816263-9b910be24d5f?w=1920&q=85') center/cover no-repeat fixed,
        /* Fallback gradient - Hogwarts colors */
        linear-gradient(135deg, #2C1B47 0%, #1A237E 50%, #3d2b5c 100%);
    min-height: 100vh;
    color: #333;
    position: relative;
}

/* Fallback gradient - bright and cheerful */
@supports not (background: url()) {
    body {
        background: linear-gradient(135deg, #ffd1dc 0%, #e6e6fa 50%, #fffacd 100%);
    }
}

/* Twinkling stars - more visible in daylight */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(4px 4px at 20% 30%, #ffd700, transparent),
        radial-gradient(3px 3px at 60% 70%, #ffed4e, transparent),
        radial-gradient(3px 3px at 50% 50%, #ffd700, transparent),
        radial-gradient(2px 2px at 80% 10%, #ffed4e, transparent),
        radial-gradient(4px 4px at 90% 60%, #ffd700, transparent),
        radial-gradient(3px 3px at 33% 80%, #ffed4e, transparent),
        radial-gradient(2px 2px at 15% 20%, #ffd700, transparent),
        radial-gradient(4px 4px at 75% 35%, #ffed4e, transparent),
        radial-gradient(3px 3px at 45% 15%, #ffd700, transparent),
        radial-gradient(2px 2px at 85% 85%, #ffed4e, transparent);
    background-size: 200% 200%;
    animation: twinkle 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #2C1B47, #3d2b5c, #1A237E);
    padding: 15px 25px;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 4px solid #D4AF37;
    position: relative;
    z-index: 10;
}

.logo h1 {
    font-size: 32px;
    background: linear-gradient(45deg, #D4AF37, #FFD700, #C9A961);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Georgia', serif;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.logo .tagline {
    font-size: 13px;
    color: #D4AF37;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Dormitory Tabs - Brighter colors */
.dormitory-tabs {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.dorm-tab {
    padding: 12px 20px;
    border: none;
    border-radius: 15px 15px 0 0;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0.85;
    font-family: 'Georgia', serif;
    animation: tabFloat 4s ease-in-out infinite;
}

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

.dorm-tab:hover {
    opacity: 1;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
    animation: none;
}

.dorm-tab.active {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.8);
    border-bottom: 4px solid #ffd700;
    animation: activeGlow 2s ease-in-out infinite;
}

@keyframes activeGlow {
    0%, 100% { box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6); }
    50% { box-shadow: 0 8px 30px rgba(255, 215, 0, 1); }
}

.dorm-tab span {
    cursor: pointer;
}

/* Header Controls */
.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-btn, .action-btn {
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-family: 'Georgia', serif;
}

.nav-btn {
    background: linear-gradient(135deg, #D4AF37, #C9A961);
    color: #2C1B47;
    border: 2px solid #8B7355;
}

.nav-btn:hover {
    background: linear-gradient(135deg, #FFD700, #D4AF37);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

.action-btn {
    background: linear-gradient(135deg, #1A237E, #3d2b5c);
    color: #D4AF37;
    font-weight: bold;
    border: 2px solid #D4AF37;
}

.action-btn:hover {
    background: linear-gradient(135deg, #2C1B47, #1A237E);
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.action-btn.danger {
    background: linear-gradient(135deg, #6B0F1A, #800020);
    color: #FFD700;
    border: 2px solid #D4AF37;
}

.action-btn.danger:hover {
    background: linear-gradient(135deg, #800020, #6B0F1A);
}

.week-display {
    font-size: 18px;
    font-weight: bold;
    color: #D4AF37;
    padding: 0 15px;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ===== MAIN CONTAINER ===== */
.game-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: calc(100vh - 140px);
}

/* Blocks Panel - Hogwarts parchment style */
.blocks-panel {
    width: 320px;
    background: linear-gradient(135deg, #F4ECD8, #E8DCC4);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    animation: slideIn 0.5s ease;
    max-height: calc(100vh - 140px);
    border: 3px solid #8B7355;
    position: relative;
    z-index: 10;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.blocks-panel h2 {
    background: linear-gradient(45deg, #D4AF37, #FFD700, #C9A961);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.blocks-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

/* Block Items - Playful bounce effect */
.block-item {
    padding: 15px;
    border-radius: 15px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    text-align: center;
    position: relative;
    user-select: none;
    animation: gentleBounce 3s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.02); }
}

.block-item:hover {
    transform: translateX(8px) scale(1.1);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.7);
    filter: brightness(1.15);
    animation: none;
}

.block-item.selected {
    animation: pulse 0.5s infinite, glow 1s ease-in-out infinite;
    box-shadow: 0 0 25px rgba(255, 215, 0, 1);
    border: 3px solid #ffd700;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.7); }
    50% { box-shadow: 0 0 35px rgba(255, 215, 0, 1); }
}

.block-item .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    color: #333;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: none;
    font-weight: bold;
}

.block-item:hover .delete-btn {
    display: block;
}

/* HOUSE COLORS - Brighter versions */
.block-item.gryffindor, .event.gryffindor { 
    background: linear-gradient(135deg, #ff6b6b, #ffd700); 
    color: #fff; 
}
.block-item.slytherin, .event.slytherin { 
    background: linear-gradient(135deg, #4ecdc4, #44a08d); 
    color: #fff; 
}
.block-item.ravenclaw, .event.ravenclaw { 
    background: linear-gradient(135deg, #74b9ff, #a29bfe); 
    color: #fff; 
}
.block-item.hufflepuff, .event.hufflepuff { 
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e); 
    color: #333; 
}

/* MAGICAL COLORS - Vibrant and cheerful */
.block-item.pink, .event.pink { 
    background: linear-gradient(135deg, #ff6ec4, #ff9ff3); 
    color: #fff; 
}
.block-item.lavender, .event.lavender { 
    background: linear-gradient(135deg, #dda7f0, #c49be8); 
    color: #fff; 
}
.block-item.peach, .event.peach { 
    background: linear-gradient(135deg, #ffeaa7, #fab1a0); 
    color: #333; 
}
.block-item.mint, .event.mint { 
    background: linear-gradient(135deg, #81ecec, #74b9ff); 
    color: #333; 
}
.block-item.coral, .event.coral { 
    background: linear-gradient(135deg, #ff7675, #fab1a0); 
    color: #fff; 
}
.block-item.lilac, .event.lilac { 
    background: linear-gradient(135deg, #a29bfe, #dda7f0); 
    color: #fff; 
}
.block-item.sky, .event.sky { 
    background: linear-gradient(135deg, #74b9ff, #81ecec); 
    color: #fff; 
}
.block-item.rose, .event.rose { 
    background: linear-gradient(135deg, #ff6ec4, #a29bfe); 
    color: #fff; 
}
.block-item.cream, .event.cream { 
    background: linear-gradient(135deg, #ffeaa7, #ffe5b4); 
    color: #333; 
}
.block-item.blush, .event.blush { 
    background: linear-gradient(135deg, #fab1a0, #ff9ff3); 
    color: #fff; 
}
.block-item.baby-blue, .event.baby-blue { 
    background: linear-gradient(135deg, #74b9ff, #c3cfe2); 
    color: #fff; 
}

/* HARRY POTTER THEMED COLORS - Bright versions */
.block-item.golden-snitch, .event.golden-snitch { 
    background: linear-gradient(135deg, #ffd700, #ffed4e); 
    color: #333; 
}
.block-item.purple-magic, .event.purple-magic { 
    background: linear-gradient(135deg, #a29bfe, #dda7f0); 
    color: #fff; 
}
.block-item.forest-green, .event.forest-green { 
    background: linear-gradient(135deg, #55efc4, #00b894); 
    color: #fff; 
}
.block-item.phoenix-fire, .event.phoenix-fire { 
    background: linear-gradient(135deg, #ff7675, #fd79a8); 
    color: #fff; 
}
.block-item.unicorn-white, .event.unicorn-white { 
    background: linear-gradient(135deg, #ffffff, #f8f9fa); 
    color: #333; 
    border: 2px solid #ffd700; 
}
.block-item.dragon-red, .event.dragon-red { 
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f); 
    color: #fff; 
}
.block-item.mermaid-teal, .event.mermaid-teal { 
    background: linear-gradient(135deg, #4ecdc4, #81ecec); 
    color: #fff; 
}
.block-item.patronus-blue, .event.patronus-blue { 
    background: linear-gradient(135deg, #74b9ff, #a29bfe); 
    color: #fff; 
}
.block-item.potion-purple, .event.potion-purple { 
    background: linear-gradient(135deg, #a29bfe, #6c5ce7); 
    color: #fff; 
}
.block-item.dark-magic, .event.dark-magic { 
    background: linear-gradient(135deg, #636e72, #2d3436); 
    color: #ffd700; 
}
.block-item.stars-silver, .event.stars-silver { 
    background: linear-gradient(135deg, #dfe6e9, #b2bec3); 
    color: #333; 
}
.block-item.quidditch-brown, .event.quidditch-brown { 
    background: linear-gradient(135deg, #d4a574, #a0725e); 
    color: #fff; 
}
.block-item.butterbeer, .event.butterbeer { 
    background: linear-gradient(135deg, #f39c12, #fdcb6e); 
    color: #fff; 
}
.block-item.floo-powder, .event.floo-powder { 
    background: linear-gradient(135deg, #55efc4, #00b894); 
    color: #fff; 
}
.block-item.owl-brown, .event.owl-brown { 
    background: linear-gradient(135deg, #a0725e, #8b6f47); 
    color: #fff; 
}
.block-item.wand-wood, .event.wand-wood { 
    background: linear-gradient(135deg, #d4a574, #c89b65); 
    color: #fff; 
}
.block-item.pumpkin-orange, .event.pumpkin-orange { 
    background: linear-gradient(135deg, #ff9a44, #ffb347); 
    color: #fff; 
}
.block-item.mandrake-green, .event.mandrake-green { 
    background: linear-gradient(135deg, #6ab04c, #badc58); 
    color: #fff; 
}
.block-item.felix-gold, .event.felix-gold { 
    background: linear-gradient(135deg, #f1c40f, #ffeaa7); 
    color: #333; 
}

/* Create Block Section */
.create-block {
    background: linear-gradient(135deg, #F4ECD8, #E8DCC4);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid #8B7355;
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.3);
}

.create-block h3 {
    background: linear-gradient(45deg, #D4AF37, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    font-size: 18px;
    font-family: 'Georgia', serif;
}

.create-block input,
.create-block select {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #8B7355;
    border-radius: 10px;
    font-size: 15px;
    font-weight: bold;
    background: #FFF8E7;
    color: #2C1B47;
    font-family: 'Georgia', serif;
}

.create-block .input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.create-block .input-row input {
    flex: 1;
    margin: 0;
}

.create-block .input-row span {
    font-weight: bold;
    color: #6B0F1A;
    font-family: 'Georgia', serif;
}

.create-block button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #D4AF37, #C9A961);
    color: #2C1B47;
    border: 2px solid #8B7355;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Georgia', serif;
}

.create-block button:hover {
    background: linear-gradient(135deg, #FFD700, #D4AF37);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

/* Tips Section */
.tips {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    padding: 15px;
    border-radius: 15px;
    border: 2px solid #f39c12;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
}

.tips h3 {
    background: linear-gradient(45deg, #ff6b6b, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-size: 16px;
    font-family: 'Georgia', serif;
}

.tips p {
    color: #8b4513;
    margin-bottom: 5px;
    font-size: 14px;
    font-family: 'Georgia', serif;
}

/* Calendar Area */
.calendar-area {
    flex: 1;
    background: linear-gradient(135deg, #F4ECD8, #FFF8E7);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    overflow: auto;
    animation: fadeIn 0.5s ease;
    border: 3px solid #8B7355;
    position: relative;
    z-index: 10;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Stats Bar */
.stats {
    display: flex;
    gap: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #2C1B47, #1A237E, #3d2b5c);
    border-radius: 15px;
    color: #D4AF37;
    margin-bottom: 20px;
    justify-content: space-around;
    font-size: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    flex-wrap: wrap;
    border: 2px solid #D4AF37;
    font-family: 'Georgia', serif;
}

.stats b {
    font-size: 20px;
    color: #FFD700;
}

/* Calendar */
.calendar {
    background: #fffef7;
    border-radius: 15px;
    padding: 15px;
    border: 2px solid #ffd700;
}

.day-headers {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    background: #fffef7;
    z-index: 10;
    padding: 10px 0;
}

.time-header, .day-header {
    text-align: center;
    padding: 15px 10px;
    border-radius: 12px;
    font-weight: bold;
}

.time-header {
    background: linear-gradient(135deg, #8B7355, #A0826D);
    color: #FFF8E7;
    font-weight: bold;
}

.day-header {
    background: linear-gradient(135deg, #2C1B47, #1A237E);
    color: #D4AF37;
    font-size: 15px;
    border: 2px solid #D4AF37;
}

.day-header.weekend {
    background: linear-gradient(135deg, #6B0F1A, #800020);
    color: #FFD700;
}

.day-header .date {
    font-size: 13px;
    font-weight: normal;
    opacity: 0.95;
}

.grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 3px;
    background: #fffef7;
}
.grid {
    grid-auto-rows: 60px;     /* κλειδώνει ύψος σειράς */
    grid-auto-flow: row;      /* σταθερή ροή */
}

/* κρατάει τη θέση των occupied slots χωρίς να σπάει το grid */
.calendar-cell.occupied {
    visibility: hidden;
    pointer-events: none;
}


.time-cell {
    padding: 12px;
    text-align: center;
    font-weight: bold;
    background: linear-gradient(135deg, #8B7355, #A0826D);
    border-radius: 8px;
    color: #FFF8E7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.calendar-cell {
    min-height: 60px;
    border: 2px dashed #ffd700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: white;
}

.calendar-cell:hover {
    border-color: #ff6b6b;
    border-width: 3px;
    border-style: solid;
    background: linear-gradient(135deg, #fff5f5, #ffe0e0);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.calendar-cell.weekend {
    background: #f0f8ff;
}

.calendar-cell.has-event {
    border: none;
    padding: 0;
}

/* Events in Calendar */
.event {
    height: 100%;
    border-radius: 10px;
    padding: 10px;
    color: white;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.2s;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.event::before {
    content: '✨';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 30px;
    opacity: 0;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: rotate(0deg) scale(0);
    }
    50% {
        opacity: 0.8;
        transform: rotate(180deg) scale(1);
    }
}

.event:hover {
    transform: scale(0.98);
    opacity: 0.95;
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6);
}

.event:hover::before {
    animation: sparkle 0.5s ease-in-out infinite;
}

.event.span-2 { grid-row: span 2; }
.event.span-3 { grid-row: span 3; }
.event.span-4 { grid-row: span 4; }
.event.span-5 { grid-row: span 5; }
.event.span-6 { grid-row: span 6; }
.event.span-7 { grid-row: span 7; }
.event.span-8 { grid-row: span 8; }

/* Toast Notifications */
#toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 20px 30px;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border-radius: 15px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 8px 30px rgba(78, 205, 196, 0.5);
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.5s;
    z-index: 1000;
    border: 2px solid white;
    font-family: 'Georgia', serif;
}

#toast.show {
    opacity: 1;
    transform: translateY(0);
}

#toast.error {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

/* Scrollbar - Gold themed */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #fff8dc;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ffd700, #f39c12);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ffc700, #e67e22);
}

/* ===== HOGWARTS SCENE - QUIDDITCH PLAYERS ===== */
#hogwartsScene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Flying players - dynamic elements */
.flying-player {
    position: absolute;
    font-size: 70px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1)) drop-shadow(0 0 40px rgba(255, 165, 0, 0.8));
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    z-index: 2;
}

/* Flight paths */
@keyframes flyPath1 {
    0% {
        left: -100px;
        top: 30%;
        transform: rotate(-15deg) scale(1);
    }
    25% {
        left: 30%;
        top: 20%;
        transform: rotate(5deg) scale(1.1);
    }
    50% {
        left: 70%;
        top: 35%;
        transform: rotate(-10deg) scale(0.9);
    }
    75% {
        left: 60%;
        top: 50%;
        transform: rotate(8deg) scale(1.05);
    }
    100% {
        left: 120%;
        top: 40%;
        transform: rotate(-5deg) scale(1);
    }
}

@keyframes flyPath2 {
    0% {
        left: 120%;
        top: 60%;
        transform: rotate(15deg) scaleX(-1);
    }
    25% {
        left: 80%;
        top: 40%;
        transform: rotate(-5deg) scaleX(-1) scale(1.1);
    }
    50% {
        left: 40%;
        top: 55%;
        transform: rotate(10deg) scaleX(-1) scale(0.9);
    }
    75% {
        left: 20%;
        top: 35%;
        transform: rotate(-8deg) scaleX(-1) scale(1.05);
    }
    100% {
        left: -100px;
        top: 50%;
        transform: rotate(5deg) scaleX(-1);
    }
}

@keyframes flyPath3 {
    0% {
        left: 50%;
        top: -100px;
        transform: rotate(90deg);
    }
    25% {
        left: 70%;
        top: 25%;
        transform: rotate(120deg) scale(1.1);
    }
    50% {
        left: 35%;
        top: 45%;
        transform: rotate(100deg) scale(0.9);
    }
    75% {
        left: 15%;
        top: 30%;
        transform: rotate(80deg) scale(1.05);
    }
    100% {
        left: 50%;
        top: 110%;
        transform: rotate(90deg);
    }
}

@keyframes flyPath4 {
    0% {
        left: -100px;
        top: 20%;
        transform: rotate(-20deg);
    }
    50% {
        left: 50%;
        top: 50%;
        transform: rotate(10deg) scale(1.2);
    }
    100% {
        left: 120%;
        top: 80%;
        transform: rotate(20deg);
    }
}

/* Original player from ::before */
#hogwartsScene::before {
    content: '🧹';
    position: absolute;
    font-size: 70px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1)) drop-shadow(0 0 40px rgba(255, 165, 0, 0.8));
    animation: player1Flight 25s linear infinite;
    z-index: 2;
}

@keyframes player1Flight {
    0% {
        left: -100px;
        top: 30%;
        transform: rotate(-15deg);
    }
    25% {
        left: 30%;
        top: 20%;
        transform: rotate(5deg);
    }
    50% {
        left: 70%;
        top: 35%;
        transform: rotate(-10deg);
    }
    75% {
        left: 60%;
        top: 50%;
        transform: rotate(8deg);
    }
    100% {
        left: 120%;
        top: 40%;
        transform: rotate(-5deg);
    }
}

/* Golden Snitch - Bigger and more visible */
#hogwartsScene::after {
    content: '🟡';
    position: absolute;
    font-size: 50px;
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 1)) drop-shadow(0 0 50px rgba(255, 223, 0, 1));
    animation: snitchFlight 12s ease-in-out infinite;
    z-index: 2;
}

@keyframes snitchFlight {
    0%, 100% { left: 20%; top: 40%; }
    10% { left: 45%; top: 25%; }
    20% { left: 75%; top: 55%; }
    30% { left: 60%; top: 70%; }
    40% { left: 30%; top: 60%; }
    50% { left: 55%; top: 35%; }
    60% { left: 80%; top: 50%; }
    70% { left: 40%; top: 45%; }
    80% { left: 65%; top: 30%; }
    90% { left: 35%; top: 65%; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-container {
        flex-direction: column;
    }
    .blocks-panel {
        width: 100%;
        max-height: 400px;
    }
}
