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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FEEAC9 0%, #FFCDC9 50%, #FDACAC 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 900px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(253, 121, 121, 0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #FFCDC9 0%, #FDACAC 100%);
    padding: 30px;
    text-align: center;
    color: #8B0000;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(254, 234, 201, 0.3) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.header-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.logo-left, .logo-right {
    width: 100px;
    height: 100px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.logo-left:hover, .logo-right:hover {
    transform: scale(1.1) rotate(5deg);
}

.header-content {
    flex: 1;
}

.header-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 2em;
    color: #FD7979;
}

.header-icons i {
    animation: pulse 2s ease-in-out infinite;
}

.header-icons i:nth-child(1) {
    animation-delay: 0s;
}

.header-icons i:nth-child(2) {
    animation-delay: 0.3s;
}

.header-icons i:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

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

.game-container {
    padding: 40px;
}

.level-info {
    text-align: center;
    margin-bottom: 30px;
}

.level-info h2 {
    color: #FD7979;
    font-size: 1.5em;
    margin-bottom: 15px;
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    background: linear-gradient(135deg, #FDACAC 0%, #FD7979 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(253, 121, 121, 0.3);
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(253, 121, 121, 0.4);
}

.stat-item i {
    font-size: 1.2em;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.image-box {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #FEEAC9 0%, #FFCDC9 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5em;
    color: #FD7979;
    box-shadow: 0 5px 15px rgba(253, 121, 121, 0.2);
    transition: all 0.3s ease;
    border: 3px solid #FDACAC;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.image-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(253, 121, 121, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-box:hover::before {
    opacity: 1;
}

.image-box:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 20px rgba(253, 121, 121, 0.3);
    border-color: #FD7979;
}

.image-box:active {
    transform: scale(0.98);
}

.hint-section {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #FEEAC9 50%, #FFCDC9 100%);
    border-radius: 15px;
    border: 2px solid #FDACAC;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

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

.hint-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(253, 121, 121, 0.1) 0%, transparent 50%);
    animation: rotate 15s linear infinite;
}

.hint-text {
    font-size: 1.1em;
    color: #8B0000;
    margin-bottom: 15px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.answer-section {
    margin-bottom: 30px;
}

.answer-boxes {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.answer-box {
    width: 50px;
    height: 60px;
    border: 3px solid #FD7979;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    color: #FD7979;
    background: white;
    text-transform: uppercase;
}

.answer-box.filled {
    background: linear-gradient(135deg, #FDACAC 0%, #FD7979 100%);
    color: white;
}

.letter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.letter-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: linear-gradient(135deg, #FDACAC 0%, #FD7979 100%);
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.letter-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(253, 121, 121, 0.4);
    background: linear-gradient(135deg, #FD7979 0%, #FDACAC 100%);
}

.letter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-clear {
    background: #6c757d;
    color: white;
}

.btn-hint {
    background: #FEEAC9;
    color: #8B0000;
    border: 2px solid #FFCDC9;
}

.btn-submit {
    background: linear-gradient(135deg, #FDACAC 0%, #FD7979 100%);
    color: white;
}

.btn-reset {
    background: linear-gradient(135deg, #FD7979 0%, #c92a2a 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 121, 121, 0.3);
}

.message {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    font-weight: bold;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.message.success::before {
    content: '\F26A';
    font-family: 'bootstrap-icons';
    margin-right: 8px;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

.message.error::before {
    content: '\F623';
    font-family: 'bootstrap-icons';
    margin-right: 8px;
}

.message.show {
    display: block;
    animation: slideIn 0.3s ease;
}

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

.progress-bar {
    width: 100%;
    height: 8px;
    background: #FEEAC9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FDACAC 0%, #FD7979 100%);
    transition: width 0.5s ease;
}

.next-btn {
    display: none;
    margin: 20px auto 0;
    background: linear-gradient(135deg, #FDACAC 0%, #FD7979 100%);
}

.next-btn.show {
    display: flex;
}

.completion-screen {
    display: none;
    text-align: center;
    padding: 40px;
}

.completion-screen.show {
    display: block;
}

.completion-screen h2 {
    color: #FD7979;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.trophy-icon {
    font-size: 5em;
    margin: 20px 0;
    color: #FD7979;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5em;
    }
    
    .header p {
        font-size: 0.9em;
    }
    
    .logo-left, .logo-right {
        width: 60px;
        height: 60px;
    }
    
    .header-logos {
        gap: 15px;
    }

    .game-container {
        padding: 20px;
    }

    .images-grid {
        gap: 10px;
        max-width: 350px;
    }

    .image-box {
        font-size: 2.5em;
    }

    .answer-box {
        width: 35px;
        height: 45px;
        font-size: 1.3em;
        gap: 5px;
    }

    .letter-btn {
        width: 38px;
        height: 38px;
        font-size: 1em;
    }
    
    .game-stats {
        gap: 10px;
    }
    
    .stat-item {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}