:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #45B7D1;
    --success-color: #96CEB4;
    --warning-color: #FECA57;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --border-radius: 15px;
}

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

body {
    font-family: 'Arial', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

#game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
#game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

#score-container {
    display: flex;
    gap: 20px;
    font-weight: bold;
    color: var(--text-dark);
    font-size: 18px;
}

/* Buttons */
.btn {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

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

.btn-round {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-color);
    color: var(--text-light);
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.btn-round:hover {
    transform: scale(1.1);
}

.btn-small {
    background: var(--secondary-color);
    color: var(--text-light);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Form Styles */
.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.form-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 40px;
    width: min(600px, 90vw);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    text-align: center;
}

.form-progress {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    border-radius: 4px;
    width: 20%;
    transition: width 0.5s ease;
}

#question-title {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 28px;
}

#question-text {
    color: var(--text-dark);
    font-size: 20px;
    margin-bottom: 30px;
    line-height: 1.4;
}

#answer-container {
    margin-bottom: 40px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 18px;
    font-family: inherit;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(69, 183, 209, 0.1);
}

.radio-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 16px;
}

.radio-option input[type="radio"]:checked + label {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.radio-option label:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.siblings-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.siblings-input input {
    flex: 1;
}

.add-sibling-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.add-sibling-btn:hover {
    transform: scale(1.1);
}

.remove-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    transform: scale(1.1);
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.btn-primary {
    background: var(--accent-color);
}

.btn-secondary {
    background: #6c757d;
}

.btn-launch {
    background: var(--success-color);
    font-size: 20px;
    padding: 15px 30px;
}

/* Instruction Area */
#instruction-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.voice-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

#instruction-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-dark);
    flex-grow: 1;
    text-align: center;
}

/* Drop Zone */
#drop-zone {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.drop-slot {
    width: 300px;
    height: 120px;
    border: 3px dashed var(--secondary-color);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    position: relative;
    transition: all 0.3s ease;
}

.drop-slot.drag-over {
    border-color: var(--success-color);
    background: rgba(150, 206, 180, 0.2);
    transform: scale(1.05);
}

.slot-number {
    position: absolute;
    top: 10px;
    left: 15px;
    background: var(--accent-color);
    color: var(--text-light);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.slot-content {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-dark);
    text-align: center;
}

/* Words Container */
#words-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.word-card {
    background: var(--text-light);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 3px solid transparent;
    opacity: 1;
    transform: scale(1);
}

.word-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.word-card.clicked {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.word-card.correct {
    background: var(--success-color);
    color: var(--text-light);
    animation: success-pulse 0.6s ease;
}

.word-card.incorrect {
    background: var(--primary-color);
    color: var(--text-light);
    animation: shake 0.6s ease;
}

.word-card.found {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

/* Animations */
@keyframes success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    80% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--text-light);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: bounce-in 0.5s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

#animal-display {
    margin-bottom: 30px;
}

#animal-icon {
    font-size: 100px;
    margin-bottom: 15px;
    animation: bounce-in 0.8s ease;
}

#animal-name {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 10px;
}

#animal-description {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.4;
}

/* Collection */
.collection-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: var(--warning-color);
}

#animals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.animal-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed #ccc;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.animal-card.collected {
    background: var(--text-light);
    border: 2px solid var(--success-color);
    box-shadow: var(--shadow);
}

.animal-card .animal-emoji {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.animal-card .animal-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-dark);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #game-container {
        padding: 15px;
    }
    
    #instruction-text {
        font-size: 20px;
    }
    
    .word-card {
        padding: 15px;
        font-size: 18px;
    }
    
    .drop-slot {
        width: 250px;
        height: 100px;
    }
    
    #words-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
    
    #animal-icon {
        font-size: 80px;
    }
}