/* Star Catcher - Game Styles */

:root {
    --night-dark: #0a0a1f;
    --night-mid: #151530;
    --night-light: #1f1f45;
    --star-gold: #ffd700;
    --star-glow: rgba(255, 215, 0, 0.4);
    --net-blue: #64d8ff;
    --net-purple: #b794f6;
    --accent-pink: #ff6b9d;
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Quicksand', sans-serif;
    background: var(--night-dark);
    color: var(--text-light);
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
}

/* Start Screen */
#start-screen {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, var(--night-light) 0%, var(--night-dark) 100%);
    position: relative;
    overflow: hidden;
}

.start-content {
    text-align: center;
    z-index: 10;
    padding: 2rem;
}

.star-icon {
    font-size: 4rem;
    animation: starPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px var(--star-gold));
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px var(--star-gold)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 40px var(--star-gold)); }
}

.title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--star-gold);
    text-shadow: 0 0 30px var(--star-glow);
    margin: 1rem 0 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.demo-area {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin: 2rem auto;
    max-width: 280px;
    position: relative;
}

.demo-net {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border: 3px solid var(--net-blue);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(100, 216, 255, 0.3), inset 0 0 20px rgba(100, 216, 255, 0.1);
    animation: netPulse 3s ease-in-out infinite;
}

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

.demo-star {
    position: absolute;
    top: 20px;
    right: 30%;
    font-size: 1.5rem;
    animation: starFall 3s ease-in-out infinite;
}

@keyframes starFall {
    0% { transform: translateY(0); opacity: 1; }
    80% { transform: translateY(60px); opacity: 1; }
    100% { transform: translateY(60px); opacity: 0; }
}

.demo-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.glow-button {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, var(--net-blue) 0%, var(--net-purple) 100%);
    border: none;
    border-radius: 50px;
    color: var(--night-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(100, 216, 255, 0.4);
}

.glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(100, 216, 255, 0.6);
}

.secondary-button {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mic-note {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Stars Background */
.stars-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(1px 1px at 10% 20%, white, transparent),
        radial-gradient(1.5px 1.5px at 30% 40%, white, transparent),
        radial-gradient(1px 1px at 50% 10%, white, transparent),
        radial-gradient(2px 2px at 70% 60%, white, transparent),
        radial-gradient(1px 1px at 90% 30%, white, transparent),
        radial-gradient(1.5px 1.5px at 20% 80%, white, transparent),
        radial-gradient(1px 1px at 60% 90%, white, transparent),
        radial-gradient(2px 2px at 80% 15%, white, transparent);
    animation: twinkle 5s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Game Screen */
#game-screen {
    background: var(--night-dark);
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* HUD */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 100;
}

#hud > * {
    pointer-events: auto;
}

.hud-left,
.hud-right {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hud-right {
    align-items: flex-end;
}

.stars-display,
.streak-display,
.timer-display {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.star-icon-small {
    font-size: 1.2rem;
}

.streak-icon {
    font-size: 1rem;
}

.hud-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.breath-indicator {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.net-power-fill {
    width: 20%;
    height: 20%;
    background: radial-gradient(circle, var(--net-blue), var(--net-purple));
    border-radius: 50%;
    transition: all 0.15s ease;
    box-shadow: 0 0 20px var(--net-blue);
}

.icon-btn {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

/* Breath Guide */
#breath-guide {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    z-index: 50;
}

.guide-circle {
    width: 100px;
    height: 100px;
    border: 2px solid var(--net-blue);
    border-radius: 50%;
    margin: 0 auto 1rem;
    opacity: 0.5;
    animation: breatheGuide 4s ease-in-out infinite;
}

@keyframes breatheGuide {
    0%, 100% { transform: scale(0.5); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0.8; }
}

.guide-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Pause Screen */
#pause-screen {
    background: rgba(10, 10, 31, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pause-content {
    text-align: center;
}

.pause-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.pause-stats {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* End Screen */
#end-screen {
    background: radial-gradient(ellipse at center, var(--night-light) 0%, var(--night-dark) 100%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.end-content {
    text-align: center;
    padding: 2rem;
}

.constellation-display {
    width: 200px;
    height: 150px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.end-content h2 {
    font-size: 2.2rem;
    color: var(--star-gold);
    margin-bottom: 0.5rem;
}

.end-message {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.final-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    min-width: 100px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--star-gold);
    display: block;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.end-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Mobile */
@media (max-width: 600px) {
    .title {
        font-size: 2.2rem;
    }
    
    .breath-indicator {
        width: 80px;
        height: 80px;
    }
    
    .final-stats {
        flex-direction: column;
        align-items: center;
    }
}


