/* ============================================
   ROOT & VARIABLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Bangers&display=swap');

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../images/background.jpg') center center fixed;
    background-size: cover;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   LANGUAGE SELECTOR
   ============================================ */
.language-selector {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1000;
}

.language-selector select {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    padding: 6px 12px;
    color: #ffffff;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: transparent;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    text-align: center;
    padding: 10px 0;
}

.title {
    font-size: 2.2em;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
}

/* ============================================
   DAILY PROGRESS
   ============================================ */
.daily-progress {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

.progress-item {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 600;
}

.progress-item:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateY(-2px);
}

.progress-item.active {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.progress-item.completed {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.2);
}

.progress-icon {
    font-size: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

/* ============================================
   GAME CONTENT
   ============================================ */
.game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
    border-radius: 16px;
    padding: 20px;
    margin: 10px 0;
}

.game-mode {
    display: none;
}

.game-mode.active {
    display: block;
}

/* ============================================
   SEARCH CONTAINER
   ============================================ */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 20px;
    width: 100%;
}

.search-container input {
    width: 100%;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1em;
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-container input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 215, 0, 0.2);
}

.search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid rgba(255, 215, 0, 0.4);
    background: rgba(0, 0, 0, 0.3);
}

.search-result-name {
    flex: 1;
    font-weight: 600;
}

/* ============================================
   GUESSES GRID (Classic Mode)
   ============================================ */
.guesses-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.guess-header,
.guess-row {
    display: grid;
    grid-template-columns: 80px repeat(6, 1fr);
    gap: 6px;
}

.guess-header {
    margin-bottom: 5px;
}

.guess-header-cell {
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
}

.guess-cell {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    font-size: 0.85em;
    font-weight: 600;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(100px);
    animation: slideInFromRight 0.3s ease forwards;
}

.brawler-image-cell {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    opacity: 0;
    transform: translateX(100px);
    animation: slideInFromRight 0.3s ease forwards;
}

.brawler-image-cell img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

@keyframes slideInFromRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered animation delays */
.guess-row .brawler-image-cell {
    animation-delay: 0s;
}

.guess-row .guess-cell:nth-child(2) {
    animation-delay: 0.05s;
}

.guess-row .guess-cell:nth-child(3) {
    animation-delay: 0.1s;
}

.guess-row .guess-cell:nth-child(4) {
    animation-delay: 0.15s;
}

.guess-row .guess-cell:nth-child(5) {
    animation-delay: 0.2s;
}

.guess-row .guess-cell:nth-child(6) {
    animation-delay: 0.25s;
}

.guess-row .guess-cell:nth-child(7) {
    animation-delay: 0.3s;
}

.guess-cell.correct {
    background: rgba(16, 185, 129, 0.3);
    border-color: #10b981;
}

.guess-cell.higher::after,
.guess-cell.lower::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    font-size: 1.2em;
    font-weight: bold;
}

.guess-cell.higher::after {
    content: '↑';
    color: #ef4444;
}

.guess-cell.lower::after {
    content: '↓';
    color: #3b82f6;
}

/* ============================================
   PIXEL MODE
   ============================================ */
.pixel-container {
    max-width: 400px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.85);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.pixel-canvas {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   EMOJI MODE
   ============================================ */
.emoji-container {
    text-align: center;
    padding: 40px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 16px;
    margin: 0 auto 20px;
    max-width: 500px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.emoji-display {
    font-size: 4em;
}

/* ============================================
   DESCRIPTION MODE
   ============================================ */
.description-container {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 140, 0, 0.15));
    border: 3px solid rgba(255, 215, 0, 0.6);
    border-radius: 20px;
    padding: 40px;
    margin: 0 auto 20px;
    max-width: 800px;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    position: relative;
}

.description-container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #ffd700, #ff8c00, #ffd700);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.5;
    filter: blur(10px);
}

.description-text {
    font-family: 'Lilita One', cursive;
    font-size: 1.8em;
    line-height: 1.8;
    text-align: center;
    color: #fff;
    text-shadow: 
        3px 3px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        4px 4px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

/* ============================================
   GUESSES LIST (Other Modes)
   ============================================ */
.guesses-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.guess-item {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.guess-item.correct {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.2);
}

.guess-item.wrong {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   RESULT MESSAGE
   ============================================ */
.result-message {
    text-align: center;
    font-size: 1.2em;
    font-weight: 700;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

.result-message.success {
    background: rgba(16, 185, 129, 0.3);
    border: 2px solid #10b981;
    color: #10b981;
}

.result-message.failure {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    color: #ef4444;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: 15px 0;
    font-size: 0.85em;
}

.footer-link {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 8px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .guess-header,
    .guess-row {
        grid-template-columns: 60px repeat(6, 1fr);
        gap: 4px;
    }
    
    .guess-header-cell {
        font-size: 0.65em;
        padding: 6px 4px;
    }
    
    .guess-cell {
        font-size: 0.75em;
        padding: 8px 4px;
        min-height: 50px;
    }
    
    .brawler-image-cell {
        padding: 3px;
        min-height: 50px;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 1.6em;
    }
    
    .daily-progress {
        gap: 6px;
    }
    
    .progress-item {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .progress-icon {
        font-size: 1.1em;
    }
    
    .progress-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .game-content {
        padding: 15px;
    }
    
    .guess-header,
    .guess-row {
        grid-template-columns: 50px repeat(6, 1fr);
        gap: 3px;
    }
    
    .guess-header-cell {
        font-size: 0.6em;
        padding: 5px 2px;
    }
    
    .guess-cell {
        font-size: 0.7em;
        padding: 6px 2px;
        min-height: 45px;
    }
    
    .brawler-image-cell {
        padding: 2px;
        min-height: 45px;
    }
    
    .emoji-display {
        font-size: 3em;
    }
    
    .description-text {
        font-size: 1.3em;
        line-height: 1.6;
    }
    
    .description-container {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.3em;
    }
    
    .guess-header,
    .guess-row {
        grid-template-columns: 40px repeat(6, 1fr);
    }
    
    .guess-header-cell {
        font-size: 0.55em;
        padding: 4px 2px;
    }
    
    .guess-cell {
        font-size: 0.65em;
        padding: 5px 2px;
        min-height: 40px;
    }
    
    .brawler-image-cell {
        padding: 2px;
        min-height: 40px;
    }
    
    .description-text {
        font-size: 1.1em;
        line-height: 1.5;
    }
    
    .description-container {
        padding: 20px;
    }
}
