@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600;700&display=swap');

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

body {
    font-family: 'Quicksand', sans-serif;
    background: #FFF8E7;
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    background: linear-gradient(135deg, #FFE5B4 0%, #FFDAB9 50%, #FFB6C1 100%);
}

.floating-emoji {
    position: absolute;
    font-size: 60px;
    opacity: 0.2;
    animation: float 6s ease-in-out infinite;
}

.emoji-1 { top: 10%; left: 10%; animation-delay: 0s; }
.emoji-2 { top: 20%; right: 15%; animation-delay: 1s; }
.emoji-3 { bottom: 15%; left: 20%; animation-delay: 2s; }
.emoji-4 { bottom: 25%; right: 10%; animation-delay: 3s; }

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    25% { 
        transform: translateY(-30px) rotate(5deg); 
    }
    50% { 
        transform: translateY(-50px) rotate(-5deg); 
    }
    75% { 
        transform: translateY(-30px) rotate(5deg); 
    }
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-header {
    text-align: center;
    margin-bottom: 50px;
}

.hero-badge {
    display: inline-block;
    padding: 10px 25px;
    background: #fff;
    border: 3px dashed #FF6B6B;
    border-radius: 25px;
    color: #FF6B6B;
    font-size: 1em;
    font-weight: 700;
    margin-bottom: 20px;
    transform: rotate(-2deg);
    box-shadow: 5px 5px 0px #FF6B6B;
}

.hero-title {
    font-size: 5em;
    font-weight: 700;
    color: #FF6B6B;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0px #FFE66D, 8px 8px 0px #4ECDC4;
    line-height: 1.2;
    animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

.hero-subtitle {
    font-size: 1.5em;
    color: #2C3E50;
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-emoji-line {
    font-size: 2em;
    margin: 20px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.info-box {
    background: #fff;
    border: 4px solid #2C3E50;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 8px 8px 0px #2C3E50;
    transition: all 0.3s ease;
}

.info-box:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px #2C3E50;
}

.info-box h2 {
    font-size: 2em;
    color: #FF6B6B;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-box p {
    color: #2C3E50;
    line-height: 1.8;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.info-box ul {
    list-style: none;
    margin-top: 20px;
}

.info-box li {
    color: #2C3E50;
    padding: 10px 0;
    padding-left: 35px;
    position: relative;
    font-size: 1.05em;
}

.info-box li::before {
    content: '🎯';
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

.features-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.feature-bubble {
    background: #fff;
    border: 3px solid #4ECDC4;
    border-radius: 50%;
    aspect-ratio: 1;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 5px 5px 0px #4ECDC4;
}

.feature-bubble:hover {
    transform: rotate(5deg) scale(1.1);
    background: #4ECDC4;
    color: #fff;
}

.feature-bubble:hover .feature-icon {
    animation: bounce 0.5s ease;
}

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

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-text {
    font-weight: 700;
    font-size: 1em;
    color: inherit;
}

.cta-section {
    text-align: center;
}

.mega-button {
    display: inline-block;
    padding: 25px 60px;
    font-size: 1.8em;
    font-weight: 700;
    background: #FF6B6B;
    color: #fff;
    border: 5px solid #2C3E50;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 8px 8px 0px #2C3E50;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mega-button:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px #2C3E50;
    background: #FFE66D;
    color: #2C3E50;
}

.mega-button:active {
    transform: translate(0, 0);
    box-shadow: 4px 4px 0px #2C3E50;
}

/* Game Section */
.game-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #FFB6C1 0%, #FFDAB9 50%, #FFE5B4 100%);
    position: relative;
}

.game-container {
    background: #fff;
    border: 5px solid #2C3E50;
    border-radius: 30px;
    padding: 50px;
    max-width: 750px;
    width: 100%;
    box-shadow: 15px 15px 0px #2C3E50;
    position: relative;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-title {
    font-size: 3.5em;
    font-weight: 700;
    color: #FF6B6B;
    text-shadow: 3px 3px 0px #FFE66D, 6px 6px 0px #4ECDC4;
    margin-bottom: 10px;
}

.game-subtitle {
    font-size: 1.3em;
    color: #2C3E50;
    font-weight: 600;
    font-style: italic;
}

.mode-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.mode-tab {
    flex: 1;
    max-width: 250px;
    padding: 18px 30px;
    border: 3px solid #2C3E50;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    color: #2C3E50;
    box-shadow: 4px 4px 0px #2C3E50;
}

.mode-tab:hover {
    transform: translateY(-3px);
    box-shadow: 6px 6px 0px #2C3E50;
}

.mode-tab.active {
    background: #4ECDC4;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 6px 6px 0px #2C3E50;
}

.status-banner {
    text-align: center;
    font-size: 1.6em;
    color: #FF6B6B;
    margin-bottom: 30px;
    min-height: 45px;
    font-weight: 700;
    padding: 15px;
    background: #FFE66D;
    border: 3px solid #2C3E50;
    border-radius: 10px;
    box-shadow: 4px 4px 0px #2C3E50;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 40px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.game-cell {
    aspect-ratio: 1;
    background: #FFF8E7;
    border: 4px solid #2C3E50;
    border-radius: 15px;
    font-size: 4em;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 5px 5px 0px #2C3E50;
}

.game-cell:hover:not(:disabled) {
    transform: scale(1.08) rotate(2deg);
    background: #FFE66D;
    box-shadow: 7px 7px 0px #2C3E50;
}

.game-cell:active:not(:disabled) {
    transform: scale(0.95);
    box-shadow: 2px 2px 0px #2C3E50;
}

.game-cell:disabled {
    cursor: not-allowed;
}

.game-cell.x {
    color: #FF6B6B;
    animation: popScale 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.game-cell.o {
    color: #4ECDC4;
    animation: popScale 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.game-cell.winning {
    background: #FFE66D;
    animation: winShake 0.5s ease-in-out infinite;
    border-color: #FF6B6B;
}

@keyframes popScale {
    0% {
        transform: scale(0) rotate(-90deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes winShake {
    0%, 100% { transform: rotate(-2deg); }
    25% { transform: rotate(2deg); }
    50% { transform: rotate(-2deg); }
    75% { transform: rotate(2deg); }
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.action-btn {
    padding: 15px 35px;
    border: 3px solid #2C3E50;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 0px #2C3E50;
}

.btn-reset {
    background: #FF6B6B;
    color: #fff;
}

.btn-home {
    background: #4ECDC4;
    color: #fff;
}

.action-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #2C3E50;
}

.action-btn:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0px #2C3E50;
}

.scoreboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.score-card {
    background: #FFF8E7;
    border: 3px solid #2C3E50;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 5px 5px 0px #2C3E50;
    transition: all 0.3s ease;
}

.score-card:hover {
    transform: translateY(-5px) rotate(2deg);
    box-shadow: 7px 7px 0px #2C3E50;
}

.score-label {
    font-size: 1em;
    color: #2C3E50;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.score-number {
    font-size: 3em;
    font-weight: 900;
    color: #FF6B6B;
    text-shadow: 2px 2px 0px #FFE66D;
}

.confetti-burst {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: confettiFall 2s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .features-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3em;
        text-shadow: 2px 2px 0px #FFE66D, 4px 4px 0px #4ECDC4;
    }

    .info-box {
        padding: 25px;
    }

    .features-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-container {
        padding: 30px 20px;
    }

    .game-title {
        font-size: 2.5em;
        text-shadow: 2px 2px 0px #FFE66D, 4px 4px 0px #4ECDC4;
    }

    .game-cell {
        font-size: 2.5em;
    }

    .scoreboard {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}