/**
 * ═══════════════════════════════════════════════════════════════
 *  🐄 ISCH GNUEG HEU DUNNE? - Das Heu-Fang-Spiel! 🌾
 * ═══════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════
   GRUNDSTRUKTUR
   ═══════════════════════════════════════════════════════════════ */
.ighd-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: #2d1b0e;
    user-select: none;
}

/* ═══════════════════════════════════════════════════════════════
   SPIELANLEITUNG
   ═══════════════════════════════════════════════════════════════ */
.ighd-instructions {
    background: linear-gradient(135deg, #4a7c59, #2d5a3d);
    padding: 10px 15px;
    text-align: center;
    color: white;
    font-size: 14px;
    border-bottom: 3px solid #1e3d28;
}

.ighd-instructions p {
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SCOREBOARD
   ═══════════════════════════════════════════════════════════════ */
.ighd-scoreboard {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(180deg, #5D3A1A 0%, #4a2d14 100%);
    padding: 15px;
    border-bottom: 3px solid #3d2510;
}

.ighd-score, .ighd-missed, .ighd-score-target {
    text-align: center;
}

.ighd-score-label, .ighd-missed-label {
    display: block;
    font-size: 11px;
    color: #c9a86c;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ighd-score-value {
    font-size: 36px;
    font-weight: bold;
    color: #4CAF50;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.ighd-missed-value {
    font-size: 28px;
    font-weight: bold;
    color: #f44336;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.ighd-score-target {
    font-size: 14px;
    color: #c9a86c;
}

.ighd-target-value {
    font-weight: bold;
    color: #FFD700;
}

/* ═══════════════════════════════════════════════════════════════
   SPIELBEREICH
   ═══════════════════════════════════════════════════════════════ */
.ighd-game-area {
    position: relative;
    background: linear-gradient(180deg, #87CEEB 0%, #5a9fd4 100%);
}

/* Himmel */
.ighd-sky {
    position: relative;
    height: 60px;
    overflow: hidden;
}

.ighd-cloud {
    position: absolute;
    font-size: 30px;
    animation: float-cloud 15s infinite linear;
    opacity: 0.8;
}

.ighd-cloud-1 { top: 5px; animation-delay: 0s; }
.ighd-cloud-2 { top: 25px; animation-delay: -7s; }

@keyframes float-cloud {
    0% { transform: translateX(-50px); }
    100% { transform: translateX(calc(100% + 50px)); }
}

.ighd-sun {
    position: absolute;
    top: 5px;
    right: 20px;
    font-size: 35px;
    animation: sun-pulse 3s ease-in-out infinite;
}

@keyframes sun-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.ighd-mountains {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    letter-spacing: -15px;
}

/* ═══════════════════════════════════════════════════════════════
   HEU-QUELLE
   ═══════════════════════════════════════════════════════════════ */
.ighd-heu-source {
    background: linear-gradient(180deg, #8B4513 0%, #654321 100%);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid #4a2d14;
}

.ighd-bauer {
    font-size: 50px;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.4));
}

.ighd-heu-dispenser {
    display: flex;
    gap: 5px;
}

.ighd-heu-img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 50%;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}

/* ═══════════════════════════════════════════════════════════════
   FALLBEREICH
   ═══════════════════════════════════════════════════════════════ */
.ighd-fall-area {
    position: relative;
    height: 250px;
    background: linear-gradient(180deg, 
        rgba(135, 206, 235, 0.3) 0%, 
        rgba(135, 206, 235, 0.1) 100%);
    overflow: hidden;
}

.ighd-falling-heu {
    position: absolute;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.4));
    transform: translateX(-50%);
    z-index: 10;
    transition: none;
}

.ighd-heu-scored {
    animation: heu-score 0.3s ease-out forwards;
}

@keyframes heu-score {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.3); }
    100% { transform: translateX(-50%) scale(0); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   VERSCHIEBBARE HOLZPLATTE
   ═══════════════════════════════════════════════════════════════ */
.ighd-slider-container {
    position: relative;
    height: 50px;
    background: linear-gradient(180deg, #654321 0%, #4a3016 100%);
    cursor: pointer;
}

.ighd-wood-plate {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    height: 30px;
    width: 250px;
    transition: left 0.05s ease-out;
}

.ighd-plate-left,
.ighd-plate-right {
    flex: 1;
    background: linear-gradient(180deg, #D2691E 0%, #A0522D 50%, #8B4513 100%);
    border: 2px solid #5D3A1A;
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.2),
        0 3px 6px rgba(0,0,0,0.4);
}

.ighd-plate-left {
    border-radius: 5px 0 0 5px;
    border-right: none;
}

.ighd-plate-right {
    border-radius: 0 5px 5px 0;
    border-left: none;
}

.ighd-plate-hole {
    width: 80px;
    min-width: 80px;
    background: transparent;
    position: relative;
}

/* Loch-Kanten */
.ighd-plate-hole::before,
.ighd-plate-hole::after {
    content: '';
    position: absolute;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #5D3A1A 0%, #3d2510 100%);
}

.ighd-plate-hole::before { left: 0; }
.ighd-plate-hole::after { right: 0; }

.ighd-slider-hint {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   STALL MIT KÜHEN
   ═══════════════════════════════════════════════════════════════ */
.ighd-stall {
    background: linear-gradient(180deg, #4a3016 0%, #3d2510 100%);
    padding: 15px;
    min-height: 100px;
}

.ighd-kuehe {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.ighd-kuh {
    position: relative;
    text-align: center;
}

.ighd-kuh-emoji {
    font-size: 45px;
    display: block;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.4));
    transition: transform 0.2s;
}

.ighd-kuh:hover .ighd-kuh-emoji {
    transform: scale(1.1);
}

.ighd-kuh.dancing .ighd-kuh-emoji {
    animation: cow-dance 0.5s ease-in-out infinite;
}

@keyframes cow-dance {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.ighd-kuh-name {
    display: block;
    font-size: 11px;
    color: #FFD700;
    font-weight: bold;
    margin-top: 3px;
}

.ighd-kuh-bubble {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    z-index: 20;
}

.ighd-kuh-bubble.show {
    transform: translateX(-50%) scale(1);
}

.ighd-kuh-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: white;
    border-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════════
   FRAGE-LEISTE
   ═══════════════════════════════════════════════════════════════ */
.ighd-question-bar {
    background: linear-gradient(180deg, #3d2510 0%, #2d1b0e 100%);
    padding: 12px;
    text-align: center;
    border-top: 2px solid #5D3A1A;
}

.ighd-question-text {
    font-size: 16px;
    font-weight: bold;
    color: #c9a86c;
    margin-right: 10px;
}

.ighd-answer {
    font-size: 18px;
    font-weight: bold;
    color: #f44336;
}

.ighd-answer.yes {
    color: #4CAF50;
    animation: answer-pulse 0.5s ease-in-out infinite;
}

@keyframes answer-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ═══════════════════════════════════════════════════════════════
   STATISTIK
   ═══════════════════════════════════════════════════════════════ */
.ighd-stats-bar {
    background: #1a1008;
    padding: 8px;
    text-align: center;
    font-size: 12px;
    color: #8b7355;
}

.ighd-stats-bar strong {
    color: #c9a86c;
}

/* ═══════════════════════════════════════════════════════════════
   CELEBRATION
   ═══════════════════════════════════════════════════════════════ */
.ighd-celebration {
    position: absolute;
    inset: 0;
    background: rgba(0, 100, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.ighd-celebration-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.ighd-celebration h2 {
    font-size: 24px;
    margin-bottom: 15px;
    animation: rainbow-text 2s linear infinite;
}

@keyframes rainbow-text {
    0% { color: #ff6b6b; }
    25% { color: #ffd93d; }
    50% { color: #6bcb77; }
    75% { color: #4d96ff; }
    100% { color: #ff6b6b; }
}

.ighd-final-score {
    font-size: 18px;
    margin-bottom: 20px;
}

.ighd-final-points {
    font-size: 32px;
    font-weight: bold;
    color: #FFD700;
}

.ighd-dancing-cows {
    font-size: 40px;
    margin: 15px 0;
}

.ighd-dancing-cows span {
    display: inline-block;
    animation: celebration-dance 0.5s ease-in-out infinite;
}

.ighd-dancing-cows span:nth-child(2) { animation-delay: 0.15s; }
.ighd-dancing-cows span:nth-child(3) { animation-delay: 0.3s; }

@keyframes celebration-dance {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.ighd-play-again {
    font-size: 16px;
    padding: 12px 25px;
    background: #FFD700;
    border: 3px solid #B8860B;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 15px;
    color: #654321;
    font-weight: bold;
    transition: transform 0.2s;
}

.ighd-play-again:hover {
    transform: scale(1.1);
}

/* Konfetti */
.ighd-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ighd-confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100%) rotate(720deg); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 500px) {
    .ighd-container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .ighd-instructions {
        font-size: 12px;
        padding: 8px;
    }
    
    .ighd-score-value { font-size: 28px; }
    .ighd-missed-value { font-size: 22px; }
    
    .ighd-fall-area { height: 200px; }
    
    .ighd-wood-plate { width: 200px; }
    .ighd-plate-hole { width: 60px; min-width: 60px; }
    
    .ighd-kuh-emoji { font-size: 35px; }
    .ighd-kuehe { gap: 15px; }
}

/* ═══════════════════════════════════════════════════════════════
   TOUCH-GERÄTE
   ═══════════════════════════════════════════════════════════════ */
@media (hover: none) {
    .ighd-slider-hint {
        display: block;
        font-size: 11px;
        color: rgba(255,255,255,0.7);
    }
}
