/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #0d1117;
    --panel-bg: rgba(18, 22, 28, 0.85);
    --panel-border: rgba(48, 54, 61, 0.8);
    --primary: #4ade80;
    --primary-hover: #22c55e;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --text-main: #e6edf3;
    --text-muted: #8b949e;
}

body {
    background: radial-gradient(circle at top center, #1b222b 0%, var(--bg-color) 100%);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

.login-container {
    background: var(--panel-bg);
    padding: 3.5rem 3rem;
    border-radius: 16px;
    border: 1px solid var(--panel-border);
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7), inset 0 0 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 380px;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

h1 { 
    margin: 0 0 5px 0; 
    color: #fff; 
    font-size: 2.8rem; 
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.subtitle { 
    color: var(--primary); 
    margin-bottom: 2.5rem; 
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.auth-form input {
    width: 100%; 
    padding: 15px; 
    margin-bottom: 1.2rem;
    background: rgba(9, 13, 18, 0.6); 
    border: 1px solid var(--panel-border); 
    color: white;
    border-radius: 8px; 
    box-sizing: border-box;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    outline: none;
}

.auth-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.15);
    background: rgba(9, 13, 18, 0.9); 
}

.btn-group { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

.btn {
    padding: 14px; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer;
    font-weight: 700; 
    font-size: 1.2rem;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn.primary { 
    background: linear-gradient(135deg, var(--primary), #16a34a); 
    color: #000; 
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn.primary:hover { 
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5);
    background: linear-gradient(135deg, var(--primary-hover), #15803d); 
}

.btn.secondary { 
    background: transparent;
    color: var(--text-main); 
    border: 1px solid var(--panel-border);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #6e7681;
}

.btn.danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.alert { 
    padding: 12px; 
    margin-bottom: 20px; 
    border-radius: 8px; 
    font-weight: 600;
    font-size: 1.1rem;
}

.error { 
    background: rgba(127, 29, 29, 0.2); 
    color: #fca5a5; 
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.success { 
    background: rgba(20, 83, 45, 0.2); 
    color: #86efac; 
    border: 1px solid rgba(74, 222, 128, 0.3);
}

/* MENU STYLES */
.player-info {
    background: rgba(0, 0, 0, 0.4);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--panel-border);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.player-info h2 {
    margin: 5px 0 0 0;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.color-picker-container {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.color-picker-container label {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 600;
}

input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    background: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

input[type="color"]:hover {
    transform: scale(1.15);
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
}

.tank-preview {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px auto;
    position: relative;
    transform: scale(1.1);
}

.tank-body {
    position: absolute;
    top: 15px;
    left: 20px;
    width: 40px;
    height: 50px;
    border-radius: 6px;
    z-index: 2;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5), 0 5px 15px rgba(0,0,0,0.5);
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(0,0,0,0.3));
    border: 1px solid rgba(255,255,255,0.1);
}

.tank-track-left, .tank-track-right {
    position: absolute;
    width: 14px;
    height: 64px;
    background: #111;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 4px, #222 4px, #222 8px);
    top: 8px;
    border-radius: 3px;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.8);
    border: 1px solid #000;
}

.tank-track-left { left: 4px; }
.tank-track-right { right: 4px; }

.tank-turret {
    position: absolute;
    width: 26px;
    height: 26px;
    background-color: #1a1a1a;
    border-radius: 50%;
    top: 27px;
    left: 27px;
    z-index: 3;
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.1), 0 5px 10px rgba(0,0,0,0.6);
    border: 1px solid #333;
}

.tank-gun {
    position: absolute;
    width: 6px;
    height: 35px;
    background: linear-gradient(to right, #222, #444, #222);
    top: -25px;
    left: 10px;
    z-index: 2;
    border-radius: 2px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.5);
}

/* SHOP & STATS STYLES */
.stats-container {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid var(--panel-border);
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.text-yellow {
    color: #eab308;
    text-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
}

.text-green {
    color: #22c55e;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.shop-form {
    margin-top: 15px;
}

.upgrade-btn {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: #000;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
}

.upgrade-btn:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(234, 179, 8, 0.5);
    background: linear-gradient(135deg, #facc15, #a16207);
}

.upgrade-btn[disabled] {
    background: #374151;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

.shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.shop-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.shop-item h4 {
    margin: 0 0 5px 0;
    color: var(--primary);
    text-transform: uppercase;
}

.shop-item p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
