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

:root {
    --christmas-red: #dc2626;
    --christmas-green: #16a34a;
    --christmas-gold: #fbbf24;
    --christmas-dark-red: #991b1b;
    --christmas-dark-green: #15803d;
    --snow-white: #ffffff;
    --bg-gradient-1: #0f172a;
    --bg-gradient-2: #1e293b;
}

body {
    font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    padding: 20px;
    position: relative;
    margin: 0;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

/* Schneeflocken Container */
.snowflakes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -20px;
    color: var(--snow-white);
    font-size: 1rem;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    opacity: 0.8;
    animation: snowFall linear infinite;
    user-select: none;
}

.snowflake.small {
    font-size: 0.8rem;
    opacity: 0.6;
}

.snowflake.medium {
    font-size: 1.2rem;
    opacity: 0.7;
}

.snowflake.large {
    font-size: 1.8rem;
    opacity: 0.9;
}

@keyframes snowFall {
    from {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.8;
    }
    to {
        transform: translateY(calc(100vh + 50px)) translateX(30px) rotate(360deg);
        opacity: 0.2;
    }
}

header {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    position: relative;
    z-index: 5;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, var(--christmas-red), var(--christmas-gold), var(--christmas-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.5));
}

.subtitle {
    font-size: 1rem;
    color: var(--christmas-gold);
    text-shadow: 0 0 20px var(--christmas-gold);
}

h2 {
    font-size: 1.3rem;
    color: var(--christmas-gold);
    text-shadow: 0 0 15px var(--christmas-gold);
    margin-bottom: 15px;
    text-align: center;
}

@keyframes glow {
    from {
        filter: brightness(1);
    }
    to {
        filter: brightness(1.3);
    }
}

/* Game Layout */
.game-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.play-area-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 5;
}

.game-instruction {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--christmas-gold);
    border-radius: 10px;
    padding: 8px 15px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--christmas-gold);
    text-shadow: 0 0 10px var(--christmas-gold);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 6;
}

/* Seitenleiste */
.sidebar {
    width: 220px;
    background: rgba(22, 163, 74, 0.2);
    border: 3px solid var(--christmas-gold);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
    position: relative;
    z-index: 5;
}

.reset-button {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    background: rgba(220, 38, 38, 0.4);
    border: 2px solid var(--christmas-red);
    border-radius: 10px;
    color: #fff;
    font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.reset-button:hover {
    background: rgba(220, 38, 38, 0.6);
    box-shadow: 0 0 25px rgba(220, 38, 38, 0.6);
    transform: scale(1.05);
}

.reset-button:active {
    transform: scale(0.98);
}

.players-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.player-selector {
    cursor: grab;
    background: rgba(220, 38, 38, 0.3);
    border: 2px solid var(--christmas-gold);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.player-selector.has-item {
    background: rgba(22, 163, 74, 0.4);
    border-color: var(--christmas-green);
    box-shadow: 0 0 25px rgba(22, 163, 74, 0.5);
}

.player-selector:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.6);
    background: rgba(220, 38, 38, 0.4);
}

.player-selector.has-item:hover {
    background: rgba(22, 163, 74, 0.5);
    box-shadow: 0 0 35px rgba(22, 163, 74, 0.7);
}

.player-selector:active {
    cursor: grabbing;
}

.player-selector.dragging {
    opacity: 0.5;
    transform: scale(0.9);
}

.player-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
    margin: 0 auto 8px;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.5));
}

.player-name {
    display: block;
    font-size: 1rem;
    font-weight: bold;
    color: var(--christmas-gold);
    text-shadow: 0 0 10px var(--christmas-gold);
    margin-bottom: 5px;
}

.player-assignment {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(251, 191, 36, 0.3);
}

.player-assignment .assignment-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.player-assignment.has-item .assignment-text {
    font-size: 1rem;
    color: var(--christmas-gold);
    text-shadow: 0 0 10px var(--christmas-gold);
    font-weight: bold;
}

/* Spielfläche */
.play-area {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 4px solid var(--christmas-green);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 250px);
    box-shadow: 0 0 40px rgba(22, 163, 74, 0.4);
    z-index: 10;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 2px solid var(--christmas-gold);
    position: relative;
    z-index: 6;
    margin-bottom: 10px;
}

.streak-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
}

.streak-label {
    color: var(--christmas-gold);
    text-shadow: 0 0 10px var(--christmas-gold);
}

.streak-value {
    color: var(--christmas-gold);
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: 0 0 15px var(--christmas-gold);
}

.streak-max {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.current-emoji {
    font-size: 1rem;
}

.emoji-target {
    color: rgba(255, 255, 255, 0.8);
}

.emoji-display {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.8));
}

.current-player {
    font-size: 0.9rem;
    color: var(--christmas-gold);
    text-shadow: 0 0 10px var(--christmas-gold);
}

/* Aktiver Spieler in Spielfläche */
.active-player {
    position: absolute;
    width: 150px;
    height: 150px;
    pointer-events: none;
    z-index: 50;
    display: none;
}

.active-player.active {
    display: block;
}

.active-player img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.8));
}

/* Fallende Emojis */
.falling-emoji {
    position: absolute;
    font-size: 3rem;
    pointer-events: none;
    z-index: 10;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6));
    will-change: transform;
    animation: fallDown linear;
}

@keyframes fallDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(calc(100vh + 200px));
        opacity: 0.8;
    }
}

.falling-emoji.caught {
    animation: caught 0.3s ease-out forwards;
    z-index: 60;
}

@keyframes caught {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Assignments sind jetzt in der Sidebar integriert */

/* Status Section */
.status-section {
    text-align: center;
    margin-top: 30px;
    position: relative;
    z-index: 5;
}

.status-message {
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    display: none;
    margin: 0 auto;
    max-width: 500px;
}

.status-message.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.status-message.success {
    background: rgba(22, 163, 74, 0.3);
    border: 2px solid var(--christmas-green);
    color: var(--christmas-gold);
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.5);
    text-shadow: 0 0 10px var(--christmas-gold);
}

.status-message.error {
    background: rgba(255, 0, 0, 0.3);
    border: 2px solid #ff0000;
    color: #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.status-message.info {
    background: rgba(251, 191, 36, 0.3);
    border: 2px solid var(--christmas-gold);
    color: var(--christmas-gold);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    text-shadow: 0 0 10px var(--christmas-gold);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Win-Screen Overlay */
.win-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.win-overlay.show {
    display: flex;
}

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

.win-content {
    text-align: center;
    animation: winSlideIn 0.5s ease-out;
}

@keyframes winSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.win-badge {
    width: 400px;
    height: 400px;
    max-width: 80vw;
    max-height: 80vw;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.8));
    animation: winPulse 2s ease-in-out infinite;
}

@keyframes winPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.8));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 50px rgba(251, 191, 36, 1));
    }
}

.win-text {
    margin-top: 30px;
}

.win-player-name {
    font-size: 2.5rem;
    color: var(--christmas-gold);
    text-shadow: 0 0 20px var(--christmas-gold), 0 0 40px var(--christmas-gold);
    margin-bottom: 15px;
    font-weight: bold;
}

.win-item-text {
    font-size: 1.8rem;
    color: var(--christmas-gold);
    text-shadow: 0 0 15px var(--christmas-gold);
    margin-bottom: 30px;
}

.win-close-btn {
    padding: 15px 40px;
    background: rgba(22, 163, 74, 0.6);
    border: 3px solid var(--christmas-green);
    border-radius: 15px;
    color: var(--christmas-gold);
    font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.5);
    text-shadow: 0 0 10px var(--christmas-gold);
}

.win-close-btn:hover {
    background: rgba(22, 163, 74, 0.8);
    box-shadow: 0 0 30px rgba(22, 163, 74, 0.8);
    transform: scale(1.1);
}

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

/* Responsive Design - Mobile First Approach */
@media screen and (max-width: 1024px) {
    .game-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .players-container {
        flex-direction: row;
        justify-content: center;
    }
    
    .play-area {
        min-height: 500px;
    }
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .player-thumbnail {
        width: 60px !important;
        height: 60px !important;
    }
    
    /* Aktiver Spieler kleiner */
    .active-player {
        width: 100px !important;
        height: 100px !important;
    }
    
    /* Fallende Emojis kleiner */
    .falling-emoji {
        font-size: 2rem !important;
    }
    
    .game-info {
        flex-direction: column;
        gap: 5px;
        text-align: center;
        padding: 6px 10px;
    }
    
    .streak-value {
        font-size: 1.2rem;
    }
    
    .game-instruction {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    /* Spielfläche länglicher (mehr Y-Achse für mehr Zeit) */
    .play-area {
        min-height: 600px !important;
    }
    
    .win-badge {
        width: 250px;
        height: 250px;
    }
    
    .win-player-name {
        font-size: 1.8rem;
    }
    
    .win-item-text {
        font-size: 1.3rem;
    }
    
    .win-close-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* Extra kleine Bildschirme */
@media screen and (max-width: 480px) {
    .player-thumbnail {
        width: 50px !important;
        height: 50px !important;
    }
    
    .active-player {
        width: 80px !important;
        height: 80px !important;
    }
    
    .falling-emoji {
        font-size: 1.5rem !important;
    }
    
    .play-area {
        min-height: 650px !important;
    }
    
    body {
        padding: 10px;
    }
    
    .sidebar {
        padding: 10px;
    }
    
    .player-selector {
        padding: 8px;
    }
}
