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

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%);
    min-height: 100vh;
    color: #333;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header Styles */
.game-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.game-header h1 {
    text-align: center;
    color: #4a5568;
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-info {
    display: flex;
    justify-content: space-around;
    font-size: 1.2em;
    font-weight: bold;
}

.game-info div {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Game Area */
.game-area {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.instructions {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
    border-radius: 15px;
    font-size: 1.3em;
    font-weight: bold;
}

.language-selector {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.language-selector h3 {
    font-size: 1.1em;
    color: #2E8B57;
    margin: 0 0 12px 0;
    text-align: center;
    font-weight: 600;
}

.language-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.language-btn {
    border: 2px solid #dee2e6;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9em;
    color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 80px;
    text-align: center;
}

.language-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.2);
    border-color: #2E8B57;
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e8 100%);
}

.language-btn.active {
    border-color: #2E8B57;
    background: linear-gradient(135deg, #2E8B57 0%, #228B22 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.3);
    transform: translateY(-1px);
}

.sub-instruction {
    font-size: 0.8em;
    margin-top: 10px;
    opacity: 0.9;
    font-weight: normal;
}

/* Sentence Area */
.sentence-area {
    margin-bottom: 40px;
}

.sentence-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 80px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    margin-bottom: 20px;
    border: 3px dashed #fff;
    align-items: center;
    justify-content: center;
}

.sentence-slot {
    min-width: 100px;
    height: 60px;
    border: 2px dashed #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.sentence-slot.filled {
    border: 2px solid #4CAF50;
    background: rgba(76, 175, 80, 0.2);
}

.sentence-slot.highlight {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.3);
    transform: scale(1.05);
}

.sentence-info {
    text-align: center;
    font-size: 1.2em;
    color: #4a5568;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    border-left: 5px solid #4CAF50;
}

/* Word Cards */
.word-cards-area h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 1.5em;
}

.word-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    min-height: 100px;
}

.word-card {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    cursor: grab;
    user-select: none;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.word-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    cursor: grabbing;
}

.word-card.used {
    opacity: 0.3;
    transform: scale(0.9);
    cursor: not-allowed;
}

/* Different word types */
.word-card.subject { background: linear-gradient(45deg, #ff6b6b, #ee5a24); }
.word-card.verb { background: linear-gradient(45deg, #4ecdc4, #44a08d); }
.word-card.object { background: linear-gradient(45deg, #45b7d1, #96c93d); }
.word-card.adjective { background: linear-gradient(45deg, #f093fb, #f5576c); }
.word-card.adverb { background: linear-gradient(45deg, #ffeaa7, #fab1a0); }
.word-card.preposition { background: linear-gradient(45deg, #a29bfe, #6c5ce7); }

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-secondary {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.btn-warning {
    background: linear-gradient(45deg, #FF9800, #F57C00);
    color: white;
}

.btn-success {
    background: linear-gradient(45deg, #4CAF50, #388E3C);
    color: white;
}

/* Feedback */
.feedback {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback.success {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    animation: successPulse 0.6s ease-in-out;
}

.feedback.error {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    color: white;
    animation: errorShake 0.6s ease-in-out;
}

.feedback.hint {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

/* Animations */
@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

@keyframes wordDrop {
    0% { transform: translateY(-50px) scale(0.8); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.word-card {
    animation: wordDrop 0.5s ease-out;
}

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

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 2em;
}

.modal-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.2em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 10px;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .word-cards {
        gap: 10px;
    }
    
    .word-card {
        padding: 10px 15px;
        font-size: 1em;
    }
    
    .sentence-slot {
        min-width: 80px;
        height: 50px;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
}

/* Particle Effects */
.particle {
    position: absolute;
    background: #FFD700;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 2s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}
