/* Rendwave Main Styles */
:root {
    --bg-dark: #050505;
    --card-glass: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --accent-1: #FFD200;
    --accent-2: #F7971E;
    --transition-color: 2s cubic-bezier(0.4, 0, 0.2, 1);
    --bg-speed: 1;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* WAVES */
.waves-container {
    position: fixed;
    inset: -50%;
    z-index: -1;
    background: #000;
    overflow: hidden;
    filter: blur(45px);
    pointer-events: none;
}

.wave {
    position: absolute;
    width: 250vmax;
    height: 180vmax;
    border-radius: 35% 65% 60% 40% / 40% 45% 55% 60%;
    opacity: 0.6;
    transition: background var(--transition-color);
}

#wave1 { top: -30%; left: -50%; background: radial-gradient(circle at center, var(--accent-1) 0%, transparent 60%); animation: flowR calc(10s / var(--bg-speed)) linear infinite; }
#wave2 { top: 50%; left: -60%; background: radial-gradient(circle at center, var(--accent-2) 0%, transparent 60%); animation: flowR calc(15s / var(--bg-speed)) linear infinite; opacity: 0.5; }
#wave3 { top: 0%; left: -40%; background: radial-gradient(circle at center, var(--accent-1) 0%, transparent 60%); animation: flowR calc(12s / var(--bg-speed)) linear infinite reverse; opacity: 0.4; }
#wave4 { top: 30%; left: -70%; background: radial-gradient(circle at center, var(--accent-2) 0%, transparent 60%); animation: flowR calc(8s / var(--bg-speed)) linear infinite; opacity: 0.3; }

@keyframes flowR {
    0% { transform: translateX(0) scale(1) rotate(0deg); }
    50% { transform: translateX(25%) scale(1.1) rotate(5deg); }
    100% { transform: translateX(0) scale(1) rotate(0deg); }
}

/* App Container */
.app-container { width: 100%; max-width: 400px; padding: 20px; z-index: 10; }

/* Main Card */
.main-card {
    background: var(--card-glass);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    border: 1px solid var(--card-border);
    border-radius: 32px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    min-height: 580px;
}

.card-inner { padding: 32px; display: flex; flex-direction: column; height: 100%; gap: 24px; }

/* Header */
.card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 24px; }
.clock { font-size: 20px; font-weight: 800; }
.date { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; }

/* Switch */
.lang-switcher { display: flex; align-items: center; gap: 8px; }
.lang-text { font-size: 11px; font-weight: 800; color: var(--text-secondary); }
.switch { position: relative; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: rgba(255,255,255,0.08); transition: .4s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: #fff; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent-1); }
input:checked + .slider:before { transform: translateX(18px); }

/* Actions */
.card-actions { display: flex; flex-direction: column; gap: 20px; }
.action-btn {
    width: 100%; height: 64px; border-radius: 16px; border: none;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center; gap: 12px; transition: 0.2s;
}
.action-btn:active { transform: scale(0.98); }
.star-icon { font-size: 24px; color: #000; animation: sSpin 10s linear infinite; }

/* Speed Selector */
.speed-control { display: flex; flex-direction: column; gap: 8px; }
.speed-label { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--text-secondary); text-align: center; }
.speed-group { display: flex; background: rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 3px; gap: 4px; }
.speed-btn { flex: 1; background: transparent; border: none; padding: 8px; border-radius: 9px; color: var(--text-secondary); font-size: 12px; font-weight: 800; cursor: pointer; transition: 0.2s; }
.speed-btn.active { color: #000; background: #fff; }

/* HEX Badges */
.hex-container { 
    margin-top: 24px; 
    display: none; /* Initially hidden */
    gap: 12px; 
    animation: fIn 0.8s ease-out 0.2s backwards;
}
.hex-pill {
    padding: 8px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    font-family: monospace;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.hex-pill:hover { 
    background: rgba(255,255,255,0.1); 
    border-color: var(--accent-1);
    transform: translateY(-2px);
}
.hex-pill:active { transform: scale(0.95); }

/* Result Area */
.wish-display { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
.loader-wrap { display: none; flex-direction: column; align-items: center; gap: 15px; }
.spinner { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--accent-1); border-radius: 50%; animation: spinL 1s linear infinite; }
.result-wrap { display: flex; flex-direction: column; align-items: center; animation: fIn 0.8s ease-out; }
.color-name { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.accent-line { width: 40px; height: 4px; background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); border-radius: 2px; margin-bottom: 20px; }
.wish-text { font-size: 18px; color: var(--text-secondary); line-height: 1.5; }

/* Toast */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #fff;
    color: #000;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}
.toast.show { transform: translateX(-50%) translateY(0); }

@keyframes sSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spinL { to { transform: rotate(360deg); } }