* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', 'Arial', sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    background-image: linear-gradient(to bottom right, #f0f2f5 0%, #e6e9f0 100%);
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 35px;
    padding: 25px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(106, 17, 203, 0.2);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
    pointer-events: none;
    z-index: 1;
}

h1 {
    margin-bottom: 15px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.game-container {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.score-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eef2f7;
}

.timer {
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#score {
    font-weight: bold;
    color: #2575fc;
    font-size: 1.3rem;
}

#timer {
    font-weight: bold;
    font-size: 1.3rem;
}

.score-container p {
    font-size: 1.2rem;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.critical-time {
    color: #dc3545 !important;
    -webkit-text-fill-color: #dc3545;
    animation: pulsate 1s infinite;
}

@keyframes pulsate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

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

.time-up-message {
    color: #dc3545;
    font-size: 1.4rem !important;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(220, 53, 69, 0.2);
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#reset-btn {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(37, 117, 252, 0.2);
}

#reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 117, 252, 0.3);
}

#reset-btn:active {
    transform: translateY(1px);
}

.game-area {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.term, .definition {
    padding: 18px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
}

.term-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.term {
    background-color: #e8f4ff;
    border-left: 6px solid #2575fc;
}

.term::before {
    content: "Concept";
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.7rem;
    color: rgba(37, 117, 252, 0.5);
    font-weight: bold;
    text-transform: uppercase;
}

.definition {
    background-color: #f4ebff;
    border-left: 6px solid #6a11cb;
}

.definition::before {
    content: "Définition";
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.7rem;
    color: rgba(106, 17, 203, 0.5);
    font-weight: bold;
    text-transform: uppercase;
}

.selected {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.term.selected {
    background-color: #c5e1ff;
}

.definition.selected {
    background-color: #e4d0ff;
}

.matched {
    opacity: 0.7;
    transform: scale(1);
    cursor: default;
    transition: all 0.3s ease;
}

.correct-match {
    animation: correctPulse 1s;
    background-color: #ebfff0 !important;
    border-left: 6px solid #28a745 !important;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background-color: #d4ffda; }
    100% { transform: scale(1); }
}

#feedback-container {
    text-align: center;
    min-height: 70px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 12px;
    margin-top: 15px;
}

#feedback-message {
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.success-message {
    color: #28a745;
    font-size: 1.3rem !important;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(40, 167, 69, 0.2);
}

.error-message {
    color: #dc3545;
    font-size: 1.2rem !important;
    text-shadow: 0 1px 2px rgba(220, 53, 69, 0.2);
}

.completion-message {
    color: #6a11cb;
    font-size: 1.5rem !important;
    padding: 15px;
    animation: celebrationPulse 2s infinite;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes celebrationPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.celebration-emoji {
    font-size: 35px;
    display: inline-block;
    margin: 0 6px;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-15px) rotate(10deg); }
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti {
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: #f00;
    opacity: 0.8;
    animation: fall 5s linear forwards, spin 3s linear infinite;
    border-radius: 2px;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .score-container {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .container {
        margin: 0;
        padding: 15px;
    }
    
    header {
        margin-bottom: 20px;
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .game-container {
        padding: 20px;
    }
    
    .term, .definition {
        padding: 15px;
    }
    
    .game-area {
        flex-direction: column;
    }
}