:root {
    --p1-color: #00f2ff;
    --p1-glow: rgba(0, 242, 255, 0.4);
    --p2-color: #ff007a;
    --p2-glow: rgba(255, 0, 122, 0.4);
    --bg-deep: #020617;
    --glass: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    background: radial-gradient(circle at 50% 100%, #111827 0%, #020617 100%);
}

canvas {
    background: 
        radial-gradient(circle at center, rgba(17, 24, 39, 0.3) 0%, rgba(3, 7, 18, 0.9) 100%),
        url('https://www.transparenttextures.com/patterns/stardust.png');
}

.glass-card {
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.deployment-ui {
    position: absolute;
    top: 20px;
    bottom: 20px;
    width: 280px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 200;
}

.p1-ui { left: 30px; border-left: 2px solid var(--p1-color); }
.p2-ui { right: 30px; border-right: 2px solid var(--p2-color); }

.unit-select {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid transparent;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    text-transform: uppercase;
}

.unit-select:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.unit-select.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.btn-modern {
    padding: 1rem 2rem;
    border-radius: 16px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    filter: brightness(1.2);
}

.ability-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
}

.cooldown-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    transition: height linear;
    pointer-events: none;
}

.glow-text {
    text-shadow: 0 0 10px currentColor;
}

.italic-border {
    -webkit-text-stroke: 1px white;
    color: transparent;
}

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

#lobby-ui h1 {
    animation: float 4s ease-in-out infinite;
}

.noti-item {
    background: rgba(255,255,255,0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(255,255,255,0.1);
    animation: fade-out 2s forwards;
}

@keyframes fade-out {
    0% { opacity: 0; transform: translateY(10px); }
    10% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

.sell-btn {
    background: rgba(255, 255, 255, 0.03);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    width: 100%;
    transition: 0.3s;
    cursor: pointer;
}

.sell-btn:hover {
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.3);
}

.sell-btn.active {
    background: #f43f5e;
    color: white;
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.4);
    animation: pulse 1.5s infinite;
}

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

/* MOBILE RESPONSIVE */
@media (max-width: 1024px) {
    .deployment-ui {
        width: 160px;
        padding: 0.75rem;
        gap: 0.5rem;
    }
    .unit-select {
        padding: 8px;
        font-size: 0.6rem;
    }
    .p1-ui { left: 10px; }
    .p2-ui { right: 10px; }
    #game-title { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    .deployment-ui {
        position: fixed;
        top: auto;
        bottom: 20px;
        height: auto;
        width: 45%;
        max-height: 50vh;
        overflow-y: auto;
    }
    .p1-ui { left: 5px; }
    .p2-ui { right: 5px; }
    .power-bar-container { width: 90%; gap: 10px; }
}
