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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5rem;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instructions {
    text-align: center;
    margin-bottom: 30px;
    color: #b8c6db;
    font-size: 1.1rem;
}

.game-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    min-height: 600px;
}

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

.film-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    border: 2px solid rgba(255, 107, 107, 0.3);
    transition: opacity 0.8s ease;
}

.film-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 10px;
    text-align: center;
}

.film-list {
    list-style: none;
    padding: 0;
}

.film-list li {
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.95rem;
    color: #e8eaf6;
    border-left: 3px solid #ff6b6b;
}

.column {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.clichés-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.image-item {
    width: 100%;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: grab;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: visible;
    border: 2px solid transparent;
    padding-bottom: 60px;
    margin-bottom: 20px;
}

.image-item .image-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ff6b6b;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 10;
    border: 2px solid #ff6b6b;
}

.image-cliché-label {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: rgba(255, 107, 107, 0.95);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.5);
    animation: fadeInUp 0.6s ease;
    border: 2px solid #ff6b6b;
    z-index: 10;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.image-item.dragging {
    opacity: 0.5;
    transform: scale(1.05);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.cliché-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cliché-item.drag-over {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    transform: scale(1.02);
}

.cliché-item.matched {
    background: rgba(46, 213, 115, 0.2);
    border-color: #2ed573;
    border-style: solid;
}

.cliché-item.incorrect {
    background: rgba(255, 71, 87, 0.2);
    border-color: #ff4757;
    animation: shake 0.5s ease-in-out;
}

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

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.score-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ff6b6b;
}

.feedback {
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    min-height: 30px;
}

.feedback.success {
    color: #2ed573;
}

.feedback.error {
    color: #ff4757;
}

@media (max-width: 1200px) {
    .game-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
    }
    
    .images-grid, .clichés-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}