/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.container {
    max-width: 98vw;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Spielfeld / Board Styles */
.monster-pool {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.monster-pool h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.monsters-container.board {
    position: relative;
    height: calc(100vh - 300px);
    background: #f7fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
}

/* Monster Styles */
.monster {
    position: absolute; /* positioned on the board */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: grab;
    transition: box-shadow 0.2s ease;
    border: 3px solid transparent;
    width: 110px; /* default width, updated responsively */
}

.monster:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-color: #667eea;
}

.monster:active { cursor: grabbing; }

.monster.dragging { opacity: 0.85; z-index: 1000; }

/* When two monsters overlap, make them both slightly transparent */
.monster.overlap { opacity: 0.8; }

/* Monster checkbox */
.monster .monster-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    z-index: 5;
    cursor: pointer;
}

.monster img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 8px;
}

.monster-label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    word-wrap: break-word;
}

/* removed group zone styles */

/* Controls */
.controls {
    text-align: center;
}

.reset-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.reset-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.reset-btn:active {
    transform: translateY(0);
}

/* Responsive Design */

/* Tablet styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .monsters-container.board { height: calc(100vh - 200px); }
    .monster { width: 100px; padding: 10px; }
    .monster img { width: 70px; height: 70px; }
}

/* Mobile styles */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 0.9rem;
    }
    
    .monster-pool {
        padding: 15px;
        margin-bottom: 20px;
    }
    .monsters-container.board { height: calc(100vh - 200px); }
    .monster { width: 90px; padding: 8px; }
    .monster img { width: 60px; height: 60px; }
    
    .monster-label {
        font-size: 0.8rem;
    }
    
    
    .reset-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .monster {
        padding: 18px;
        min-width: 110px;
    }
    
    .monster img {
        width: 85px;
        height: 85px;
    }
    
    .reset-btn {
        padding: 18px 36px;
        font-size: 1.2rem;
    }
}

/* Animation for successful drop */
@keyframes dropSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.monster.drop-success {
    animation: dropSuccess 0.3s ease;
}

/* Placeholder for empty groups */
/* no predefined groups placeholder */
