* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Logo */
.logo-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.logo-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: logoPattern 20s linear infinite;
    pointer-events: none;
}

@keyframes logoPattern {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(30px, 30px);
    }
}

.logo {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.logo-question {
    font-size: 48px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    display: inline-block;
    animation: logoPulse 2s ease-in-out infinite;
    margin: 0 5px;
}

.logo-text {
    font-size: 42px;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 3px;
    display: inline-block;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.logo-subtitle {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 8px;
    margin-top: 5px;
    text-transform: uppercase;
}

.logo-large {
    margin-bottom: 20px;
}

.logo-large .logo-question {
    font-size: 72px;
    margin: 0 8px;
}

.logo-large .logo-text {
    font-size: 64px;
    letter-spacing: 5px;
}

.logo-large .logo-subtitle {
    font-size: 24px;
    letter-spacing: 10px;
    margin-top: 10px;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-top: 3px solid rgba(255, 255, 255, 0.2);
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
}

.timer-container {
    margin-top: 15px;
}

.timer-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.timer-fill {
    height: 100%;
    background: #ffd700;
    border-radius: 10px;
    transition: width 0.1s linear, background-color 0.3s;
    width: 100%;
}

.timer-fill.warning {
    background: #ff6b6b;
}

.timer-text {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    font-weight: bold;
}

.combo-indicator {
    text-align: center;
    margin-top: 10px;
    padding: 8px 15px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
    animation: comboGlow 2s ease-in-out infinite;
}

.combo-text {
    display: inline-block;
}

@keyframes comboGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    }
}

/* Game Area */
.game-area {
    padding: 30px 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.words-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
}

.word-box {
    background: #f8f9fa;
    border: 3px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    color: #212529;
    transition: all 0.3s ease;
    user-select: none;
    word-break: break-all;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    animation: wordAppear 0.5s ease-out forwards;
}

@keyframes wordAppear {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.word-box:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.word-box.different {
    animation: pulse 1s infinite, highlightDifferent 0.5s ease-out;
    border-color: #eb3349;
    background: #fff5f5;
    box-shadow: 0 0 20px rgba(235, 51, 73, 0.5);
}

@keyframes highlightDifferent {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Buttons */
.buttons-container {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
}

.btn {
    flex: 1;
    padding: 25px 20px;
    border: none;
    border-radius: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.95);
}

.btn-yes {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-yes:hover {
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4);
}

.btn-no {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.btn-no:hover {
    box-shadow: 0 6px 20px rgba(235, 51, 73, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    margin-top: 15px;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-large {
    padding: 20px 40px;
    font-size: 28px;
}

.btn-text {
    font-size: 32px;
}

.btn-subtitle {
    font-size: 14px;
    opacity: 0.9;
    font-weight: normal;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-title {
    font-size: 36px;
    color: #eb3349;
    margin-bottom: 20px;
    font-weight: bold;
}

.modal-text {
    font-size: 18px;
    color: #495057;
    margin-bottom: 10px;
}

/* .game-title ya no se usa, se reemplazó por el logo */

.game-description {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-buttons {
    margin-top: 20px;
}

/* Ad Container */
.ad-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    min-height: 100px;
    text-align: center;
}

.ad-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-banner {
    width: 100%;
    max-width: 728px;
    margin: 0 auto 20px;
    text-align: center;
    min-height: 90px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos para anuncios de AdSense */
.adsbygoogle {
    display: block;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 480px) {
    .word-box {
        font-size: 24px;
        padding: 20px;
        min-height: 80px;
    }

    .btn-text {
        font-size: 28px;
    }

    .stat-value {
        font-size: 20px;
    }

    .modal-title {
        font-size: 28px;
    }
    
    /* Logo responsive */
    .logo-question {
        font-size: 36px !important;
        margin: 0 3px !important;
    }
    
    .logo-text {
        font-size: 32px !important;
        letter-spacing: 2px !important;
    }
    
    .logo-subtitle {
        font-size: 14px !important;
        letter-spacing: 5px !important;
    }
    
    .logo-large .logo-question {
        font-size: 56px !important;
        margin: 0 5px !important;
    }
    
    .logo-large .logo-text {
        font-size: 48px !important;
        letter-spacing: 3px !important;
    }
    
    .logo-large .logo-subtitle {
        font-size: 18px !important;
        letter-spacing: 6px !important;
    }
}

/* Animaciones */
.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.correct {
    animation: correct 0.5s;
}

@keyframes correct {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Efectos de partículas */
.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 1s ease-out forwards;
}

@keyframes particleFloat {
    to {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Feedback de puntos */
.points-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    color: #38ef7d;
    text-shadow: 0 0 20px rgba(56, 239, 125, 0.8);
    z-index: 100;
    pointer-events: none;
    animation: pointsFloat 2s ease-out forwards;
}

@keyframes pointsFloat {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -100%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -150%) scale(1);
        opacity: 0;
    }
}

/* Notificación de combo */
.combo-notification {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd700 0%, #ff6b6b 100%);
    color: white;
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 36px;
    font-weight: bold;
    z-index: 2000;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.6);
    animation: comboPulse 1.5s ease-out forwards;
    text-align: center;
}

@keyframes comboPulse {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.9;
    }
}

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    display: none;
}

.cookie-notice.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-content p {
    flex: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-cookie {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-cookie:hover {
    background: #764ba2;
}

.btn-cookie-link {
    color: #667eea;
    text-decoration: underline;
    font-size: 14px;
}

.btn-cookie-link:hover {
    color: #764ba2;
}

/* Footer */
.footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
}

.footer-links {
    font-size: 14px;
    color: #6c757d;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.footer-links span {
    color: #dee2e6;
    margin: 0 5px;
}

@media (max-width: 480px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .footer-links {
        font-size: 12px;
    }
}

/* Confeti para récords */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #ffd700;
    top: -10px;
    animation: confettiFall 3s linear forwards;
    z-index: 3000;
    border-radius: 50%;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Mensaje de error mejorado */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(235, 51, 73, 0.95);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    font-size: 24px;
    font-weight: bold;
    z-index: 1500;
    box-shadow: 0 10px 40px rgba(235, 51, 73, 0.5);
    animation: errorPop 0.5s ease-out;
    text-align: center;
    max-width: 90%;
}

/* Level Up */
.level-up {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 60px;
    border-radius: 20px;
    font-size: 48px;
    font-weight: bold;
    z-index: 2000;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.6);
    animation: levelUpPop 1s ease-out forwards;
    text-align: center;
}

.level-up-text {
    font-size: 24px;
    margin-top: 10px;
    opacity: 0.9;
}

@keyframes levelUpPop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0;
    }
}

@keyframes errorPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Logro/achievement */
.achievement {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    z-index: 2000;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.6);
    animation: achievementSlide 0.5s ease-out, achievementHide 0.5s ease-out 2.5s forwards;
    max-width: 250px;
}

@keyframes achievementSlide {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes achievementHide {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Mejoras en partículas */
.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 1s ease-out forwards;
}

.particle:nth-child(odd) {
    background: #38ef7d;
    width: 12px;
    height: 12px;
}

.particle:nth-child(3n) {
    background: #667eea;
    width: 8px;
    height: 8px;
}

.particle:nth-child(4n) {
    background: #ff6b6b;
    width: 14px;
    height: 14px;
}

