/* Variables CSS */
:root {
    --primary-color: #77dd77;
    --secondary-color: #a8e6cf;
    --accent-color: #dcedc1;
    --light-color: #e8f5e9;
    --text-color: #2e7d32;
    --white: #ffffff;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 0 10%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #fff;
    transition: all 0.3s ease;
}

.header:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header .navigation ul li {
    float: left;
    position: relative;
}

.header .navigation ul li a {
    font-size: 16px;
    font-weight: 500;
    color: var(--white);
    text-decoration: none;
    padding: 22px 20px;
    display: block;
    transition: all 0.3s ease;
}

.header .navigation ul li a:hover {
    background-color: rgba(255, 255, 255, 0.733);
    transform: translateY(-2px);
    color: var(--text-color);
}

#toggle,
.header label {
    display: none;
    cursor: pointer;
}

.menu {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

@media (max-width: 950px) {
    .header label {
        display: initial;
    }

    .header {
        padding: 15px 10%;
    }

    .header .navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        display: none;
        border-radius: 0 0 12px 12px;
    }

    .header .navigation ul li {
        width: 100%;
    }

    .header .navigation ul li a {
        padding: 12px 20px;
    }

    #toggle:checked ~ .navigation {
        display: block;
        animation: slideDown 0.4s ease-out;
    }
}

/* Animación para el menú desplegable */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #a8e6cf 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 80px; /* Para compensar el header fijo */
}

.container {
    max-width: 1200px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin-top: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #2575fc;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #6a11cb;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.instructions {
    background-color: #f0f8ff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 5px solid #2575fc;
}

.game-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.words-container {
    flex: 1;
    min-width: 300px;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.categories-container {
    flex: 2;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.category {
    background-color: #e9ecef;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category:hover {
    transform: translateY(-5px);
}

.category h3 {
    color: #6a11cb;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid #6a11cb;
    padding-bottom: 5px;
}

.word {
    display: inline-block;
    background-color: #2575fc;
    color: white;
    padding: 8px 15px;
    margin: 5px;
    border-radius: 20px;
    cursor: grab;
    user-select: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.word:hover {
    background-color: #6a11cb;
    transform: scale(1.05);
}

.word.dragging {
    opacity: 0.7;
    transform: scale(1.1);
}

.drop-zone {
    min-height: 100px;
    border: 2px dashed #6a11cb;
    border-radius: 10px;
    padding: 10px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.drop-zone.highlight {
    background-color: rgba(106, 17, 203, 0.1);
    border-color: #2575fc;
}

.score-container {
    text-align: center;
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #2575fc;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

button {
    background: linear-gradient(to right, #6a11cb, #2575fc);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.message {
    text-align: center;
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 30px;
}

.success {
    color: #28a745;
}

.error {
    color: #dc3545;
}

/* Responsive styles */
@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
    }
    
    .words-container, .categories-container {
        width: 100%;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .categories-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
    
    .word {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}