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

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Header */
#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#game-title {
    font-size: 2em;
    color: #FF1744;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#wind-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: #555;
}

#wind-arrow {
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

#score-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

#score {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

#lives {
    font-size: 1.2em;
}

#combo {
    font-size: 1.5em;
    font-weight: bold;
    color: #FF1744;
    animation: pulse 0.5s infinite;
}

#combo.hidden {
    display: none;
}

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

/* Canvas */
#canvas-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

#canvas {
    display: block;
    border-radius: 15px;
}

#wind-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Controls */
#controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.control-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-family: inherit;
    touch-action: manipulation;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn.boost {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    font-size: 1em;
    padding: 15px 40px;
}

#instructions {
    text-align: center;
    color: white;
    font-size: 0.9em;
}

.desktop-hint,
.mobile-hint {
    display: none;
}

@media (min-width: 768px) {
    .desktop-hint { display: inline; }
}

@media (max-width: 767px) {
    .mobile-hint { display: inline; }
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    color: #FF1744;
    margin-bottom: 20px;
    font-size: 2em;
}

.modal-content p {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.modal-content ul {
    text-align: left;
    margin: 20px auto;
    max-width: 400px;
    color: #555;
}

.modal-content li {
    margin: 10px 0;
}

.kite-preview {
    width: 80px;
    height: 80px;
    margin: 20px auto;
    background: linear-gradient(45deg, #FF1744 50%, transparent 50%),
                linear-gradient(-45deg, #FF1744 50%, transparent 50%);
    background-size: 50% 100%;
    background-position: left, right;
    background-repeat: no-repeat;
    transform: rotate(45deg);
    position: relative;
    transition: transform 0.3s ease;
}

.kite-preview::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    width: 3px;
    height: 40px;
    background: #FF1744;
}

.game-btn {
    padding: 15px 40px;
    margin: 10px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-family: inherit;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.game-btn.secondary {
    background: linear-gradient(135deg, #888 0%, #666 100%);
}

#final-score {
    font-size: 2.5em;
    font-weight: bold;
    color: #FF1744;
    margin: 20px 0;
}

#high-score {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 10px;
}

#ai-message {
    font-style: italic;
    color: #666;
    margin: 20px 0;
}

#leaderboard {
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
}

#leaderboard h3 {
    color: #FF1744;
    margin-bottom: 10px;
}

#leaderboard div {
    padding: 5px 0;
    color: #555;
}

/* Footer */
#footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#footer a {
    color: #FF1744;
    text-decoration: none;
    font-weight: bold;
}

#footer a:hover {
    text-decoration: underline;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    #game-title {
        font-size: 1.5em;
    }
    
    #header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    #wind-indicator {
        font-size: 0.8em;
    }
    
    .control-btn {
        padding: 12px 25px;
        font-size: 1em;
    }
    
    .modal-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    #game-container {
        padding: 10px;
    }
    
    #game-title {
        font-size: 1.2em;
    }
    
    .control-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}