/* Shared styles for all Recovery Learning Games */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    line-height: 1.6;
}

/* Game Container */
.game-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.game-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.game-header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
}

.game-header p {
    opacity: 0.9;
    font-size: 1.1em;
}

.back-link {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    text-decoration: none;
    font-size: 1.5em;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 1;
}

/* Controls */
.game-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 20px;
    background: white;
    border-bottom: 1px solid #eee;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Score Board */
.score-board {
    background: white;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.score {
    font-size: 1.4em;
    color: #333;
}

.score span {
    font-weight: bold;
    color: #667eea;
}

.message {
    margin-top: 10px;
    font-weight: 600;
    min-height: 24px;
}

.message.success {
    color: #28a745;
}

.message.error {
    color: #dc3545;
}

.message.complete {
    color: #667eea;
    font-size: 1.2em;
}

/* Game Board */
.game-board {
    background: white;
    padding: 30px;
    min-height: 400px;
}

/* Drag Items */
.drag-item {
    padding: 14px 18px;
    border-radius: 10px;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
    margin-bottom: 10px;
}

.drag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.drag-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.drag-item.matched {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

/* Word Style */
.word-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

/* Definition Style */
.definition-item {
    background: #f8f9fa;
    border: 2px solid #ddd;
    color: #333;
}

.definition-item.drag-over {
    border-color: #667eea;
    background: #e8f0fe;
}

.definition-item.matched {
    background: #d4edda;
    border-color: #28a745;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 20px;
    min-height: 80px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.drop-zone.drag-over {
    border-color: #667eea;
    background: #e8f0fe;
}

.drop-zone.correct {
    border-color: #28a745;
    background: #d4edda;
}

.drop-zone.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
}

/* Columns Layout */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.column h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3em;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* Matched Label */
.matched-label {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    margin-left: 10px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .two-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .game-header h1 {
        font-size: 1.8em;
    }

    .back-link {
        position: static;
        display: block;
        margin-bottom: 15px;
        transform: none;
    }
}

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

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

.pulse {
    animation: pulse 0.3s ease;
}

.shake {
    animation: shake 0.3s ease;
}
/* Mobile Optimization - Override for all games */
@media (max-width: 768px) {
    .game-container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .game-board {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
}