:root { 
    --bg: #0b0f12; 
    --panel: #14181c; 
    --accent: #ff4655; /* Valorant Red */
    --text-muted: #768089;
    --common: #3b82f6; --epic: #a855f7; --legendary: #facc15; 
}

body, html { background: var(--bg); color: #ece8e1; font-family: 'Rajdhani', sans-serif; margin: 0; overflow: hidden; height: 100%; width: 100%; user-select: none; }

/* === UI COMPONENTS === */
.tech-border { border: 1px solid rgba(255,255,255,0.1); position: relative; background: rgba(20, 24, 28, 0.4); }
.tech-border::after { content: ''; position: absolute; bottom: -1px; right: -1px; width: 8px; height: 8px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.tech-border::before { content: ''; position: absolute; top: -1px; left: -1px; width: 8px; height: 8px; border-top: 2px solid var(--text-muted); border-left: 2px solid var(--text-muted); }

.btn-tac {
    background: rgba(255, 70, 85, 0.05); border: 1px solid var(--accent); color: var(--accent);
    font-family: 'Syncopate'; font-size: 11px; font-weight: bold; letter-spacing: 2px;
    padding: 14px 28px; transition: transform 0.1s, background 0.2s; text-transform: uppercase; cursor: pointer;
    position: relative; overflow: hidden; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
@media (hover: hover) { 
    .btn-tac:hover { background: var(--accent); color: #000; box-shadow: 0 0 20px rgba(255, 70, 85, 0.4); } 
}
.btn-tac:active { transform: scale(0.96); background: var(--accent); color: #000; }
.btn-tac:disabled { opacity: 0.4; cursor: not-allowed; filter: grayscale(1); box-shadow: none; transform: none; color: var(--accent); background: transparent; }

/* === NOTIFICATIONS === */
#tac-notify { 
    position: fixed; top: 24px; right: -350px; z-index: 9999; 
    background: rgba(15, 20, 25, 0.95); border-left: 4px solid var(--accent); 
    padding: 16px 24px; display: flex; align-items: center; gap: 16px;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px); box-shadow: -10px 10px 40px rgba(0,0,0,0.6);
    min-width: 280px;
}
#tac-notify.active { right: 24px; }

/* === MACHINE & ANIMATION === */
.machine-frame { 
    background: linear-gradient(180deg, #0b0f12 0%, #000 50%, #0b0f12 100%);
    border-top: 1px solid rgba(255,255,255,0.15); border-bottom: 1px solid rgba(255,255,255,0.15);
    height: 160px; position: relative; overflow: hidden; width: 100%; max-width: 800px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
}
#reel { display: flex; align-items: center; height: 100%; will-change: transform; padding-left: 50%; }

.item-card { 
    width: 140px; height: 120px; margin: 0 4px; background: rgba(30, 35, 40, 0.5); 
    border: 1px solid rgba(255,255,255,0.05); flex-shrink: 0; display: flex; 
    align-items: center; justify-content: center; position: relative; 
    transition: transform 0.2s, box-shadow 0.2s;
}
.item-card img { pointer-events: none; user-select: none; }

/* Item Glows */
.rarity-common { border-bottom: 2px solid var(--common); background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.05)); }
.rarity-epic { border-bottom: 2px solid var(--epic); background: linear-gradient(to bottom, transparent, rgba(168, 85, 247, 0.05)); box-shadow: inset 0 -10px 20px rgba(168, 85, 247, 0.05); }
.rarity-legendary { border-bottom: 2px solid var(--legendary); background: linear-gradient(to bottom, transparent, rgba(250, 204, 21, 0.05)); box-shadow: inset 0 -10px 20px rgba(250, 204, 21, 0.1); border-top: 1px solid rgba(250, 204, 21, 0.1); }

.gauge { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 20; transform: translateX(-50%); box-shadow: 0 0 15px var(--accent); opacity: 0.8; }

/* === MODALS & INPUTS === */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 2000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); opacity: 0; transition: opacity 0.3s; }
.modal-overlay.open { display: flex; opacity: 1; }

.tac-input { 
    background: rgba(0,0,0,0.4); border: 1px solid #333; color: white; padding: 14px; 
    font-family: 'Rajdhani'; font-weight: 600; width: 100%; text-align: left; outline: none; transition: 0.3s;
    font-size: 14px;
}
.tac-input:focus { border-color: var(--accent); box-shadow: 0 0 15px rgba(255, 70, 85, 0.1); }
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #0b0f12; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #333; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === INVENTORY & SCRAP MODE === */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding-bottom: 100px !important; }
.inv-item { position: relative; transition: 0.2s; border: 1px solid #333; background: #14181c; overflow: hidden; display: flex; flex-direction: column; }
.inv-item:hover { border-color: #666; }
.scrap-mode .inv-item { cursor: pointer; opacity: 0.6; }
.scrap-mode .inv-item:hover { opacity: 1; border-color: var(--accent); }
.scrap-mode .inv-item.selected { opacity: 1; border-color: var(--accent) !important; background: rgba(255, 70, 85, 0.05); box-shadow: inset 0 0 15px rgba(255,70,85,0.2); }

.inv-check { 
    position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; 
    border: 1px solid rgba(255,255,255,0.4); background: rgba(0,0,0,0.8); z-index: 20; 
    display: none; align-items: center; justify-content: center; transition: 0.2s;
}
.scrap-mode .inv-check { display: flex; }
.inv-item.selected .inv-check { background: var(--accent); border-color: var(--accent); }
.inv-item.selected .inv-check::after { content: '✓'; font-size: 12px; color: black; font-weight: bold; }

.inv-actions { margin-top: auto; width: 100%; border-top: 1px solid #333; display: flex; }
.btn-card {
    width: 100%; padding: 8px 0; font-size: 9px; font-weight: bold; text-transform: uppercase; 
    cursor: pointer; transition: 0.2s; border: none; font-family: 'Rajdhani'; letter-spacing: 1px;
    background: #1e2329; color: var(--common);
}
.btn-card:hover { background: var(--common); color: white; }
.scrap-mode .btn-access { display: none; }

.btn-toggle-scrap {
    background: rgba(255, 255, 255, 0.05); border: 1px solid #333; color: #888;
    font-size: 10px; padding: 6px 16px; font-family: 'Syncopate'; font-weight: bold;
    transition: 0.2s; cursor: pointer; display: flex; items-center; gap: 6px;
}
.btn-toggle-scrap:hover { border-color: var(--accent); color: var(--accent); }
.btn-toggle-scrap.active { background: var(--accent); color: black; border-color: var(--accent); box-shadow: 0 0 15px rgba(255,70,85,0.4); }

.scrap-toolbar {
    display: none; gap: 8px; padding: 10px 24px; background: #0b0f12; border-bottom: 1px solid #222;
    align-items: center; justify-content: space-between; animation: slideDown 0.2s;
}
.scrap-mode-active .scrap-toolbar { display: flex; }

@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

#scrap-bar {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(20, 24, 28, 0.98); border-top: 1px solid var(--accent);
    padding: 16px 24px; display: flex; justify-content: space-between; align-items: center;
    transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
    backdrop-filter: blur(10px); z-index: 50; box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
}
#scrap-bar.show { transform: translateY(0); }

.idle-move { animation: idleScroll 120s linear infinite; }
@keyframes idleScroll { from { transform: translateX(0); } to { transform: translateX(-2000px); } }

/* === COSMETIC SYSTEM (FIXED & CONSOLIDATED) === */

/* Container Fix */
.avatar-container, .relative.w-16.h-16, .relative.w-32.h-32 {
    position: relative; z-index: 10;
}

/* BORDERS - BASIC */
.border-none { border: 2px solid #333; }
.border-basic-1 { border: 2px solid #555; }
.border-basic-2 { border: 1px solid #777; outline: 1px solid #333; outline-offset: -3px; }
.border-basic-3 { border: 4px double #444; }
.border-basic-4 { border: 2px solid #666; clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%); }
.border-basic-5 { border: 2px solid #444; box-shadow: 0 0 5px rgba(255,255,255,0.1); }

/* BORDERS - NEON */
.border-neon-blue { border: 2px solid #00f; box-shadow: 0 0 8px #00f; }
.border-neon-red { border: 2px solid #f00; box-shadow: 0 0 8px #f00; }

/* BORDERS - EPIC */
.border-pulse-purple { 
    border: 3px solid #a855f7; box-shadow: 0 0 15px #a855f7;
    animation: pulseBorder 2s infinite;
}
.border-glitch-green {
    border: 3px solid #22c55e; box-shadow: 0 0 10px #22c55e, inset 0 0 10px #22c55e;
}

/* BORDERS - LEGENDARY */
.border-rgb-anim {
    position: relative; border: 4px solid transparent;
    background: linear-gradient(#000, #000) padding-box, linear-gradient(45deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00) border-box;
    animation: spinRGB 4s linear infinite;
}
.border-fire-anim {
    border: 3px solid #f97316; box-shadow: 0 0 20px #f97316, 0 0 40px #ef4444;
    animation: pulseFire 1s infinite alternate;
}

/* ANIMATIONS */
@keyframes pulseBorder { 0% { box-shadow: 0 0 5px #a855f7; } 50% { box-shadow: 0 0 20px #a855f7; } 100% { box-shadow: 0 0 5px #a855f7; } }
@keyframes pulseFire { from { box-shadow: 0 0 10px #f97316; border-color: #f97316; } to { box-shadow: 0 0 30px #ef4444; border-color: #ef4444; } }
@keyframes spinRGB { 100% { filter: hue-rotate(360deg); } }

/* SHOP UI */
.cosmetic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; padding: 10px; }
.cosmetic-card { 
    background: #1a1f24; border: 1px solid #333; padding: 8px; text-align: center; 
    cursor: pointer; transition: 0.2s; position: relative; overflow: hidden;
}
.cosmetic-card:hover { border-color: var(--accent); background: #252a30; }
.cosmetic-card.owned { border-color: #4ade80; opacity: 0.6; }
.cosmetic-card.equipped { border-color: #facc15; box-shadow: 0 0 10px rgba(250, 204, 21, 0.3); opacity: 1; }

.xp-badge {
    background: linear-gradient(45deg, #2563eb, #1d4ed8);
    color: white; font-weight: bold; font-size: 10px; padding: 2px 6px; border-radius: 4px;
    display: inline-block; margin-top: 4px;
}
/* === PROFILE STATS & LEVEL === */
.level-bar-bg { width: 100%; height: 6px; background: #333; position: relative; margin-top: 8px; border-radius: 4px; overflow: hidden; }
.level-bar-fill { height: 100%; background: linear-gradient(90deg, #ff4655, #a855f7); width: 0%; transition: width 1s ease-out; }

.stat-card {
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.stat-value { font-family: 'Syncopate'; font-weight: bold; font-size: 18px; color: white; }
.stat-label { font-size: 8px; text-transform: uppercase; color: #768089; letter-spacing: 1px; margin-top: 2px; }

.history-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px; border-bottom: 1px solid #222; font-size: 10px;
}
.history-item:last-child { border-bottom: none; }
.history-time { color: #555; font-family: monospace; }

/* === PROFILE V3: COMMAND CENTER STYLE === */
.glass-panel {
    background: rgba(20, 24, 28, 0.98); 
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    border: 1px solid #333; display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 768px) { .glass-panel { flex-direction: row; } }

.profile-sidebar {
    background: #0b0f12; border-right: 1px solid #222; position: relative;
    display: flex; flex-direction: column; align-items: center; padding: 30px 20px;
    background-image: linear-gradient(#1a1f24 1px, transparent 1px), linear-gradient(90deg, #1a1f24 1px, transparent 1px);
    background-size: 20px 20px;
}

.rank-badge {
    position: absolute; bottom: 0; right: 0; width: 24px; height: 24px;
    background: #14181c; border: 1px solid var(--accent); transform: rotate(45deg); 
    display: flex; align-items: center; justify-content: center; box-shadow: 0 0 10px rgba(0,0,0,0.5); z-index: 20;
}
.rank-badge span { transform: rotate(-45deg); font-size: 10px; font-weight: bold; color: white; }

/* Update di style.css */
.flex.border-b.border-[#333].bg-[#0b0f12] {
    display: flex;
    flex-wrap: nowrap; /* Memastikan tetap satu baris */
    overflow-x: auto;  /* Memungkinkan scroll horizontal jika layar sangat kecil */
    scrollbar-width: none; /* Sembunyikan scrollbar Firefox */
}
.flex.border-b.border-[#333].bg-[#0b0f12]::-webkit-scrollbar {
    display: none; /* Sembunyikan scrollbar Chrome/Safari */
}

.tab-btn-simple {
    padding: 12px 10px; /* Kurangi padding agar lebih ramping di mobile */
    font-size: 9px;     /* Ukuran font sedikit lebih kecil untuk mencegah overflow */
    white-space: nowrap; /* Teks tidak membungkus ke bawah */
    flex: 1 0 auto;     /* Memungkinkan tombol berbagi ruang secara merata */
    text-align: center;
}
.tab-btn-simple:hover { color: white; }
.tab-btn-simple.active { color: var(--accent); border-bottom-color: var(--accent); }

.stat-box {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05);
    padding: 15px; text-align: center;
}
.stat-box h4 { font-size: 20px; font-family: 'Syncopate'; font-weight: bold; color: white; margin: 0; }
.stat-box p { font-size: 8px; color: #777; text-transform: uppercase; margin-top: 5px; letter-spacing: 1px; }

/* Scrollbar Halus */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #0b0f12; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--accent); }
/* === PROFILE UI UPDATE (SPLIT VIEW) === */

/* Layout Kiri (Identity) */
.profile-sidebar {
    background: linear-gradient(145deg, #0b0f12 0%, #14181c 100%);
    position: relative;
    /* Pattern Background Halus */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Memastikan Avatar Bulat Sempurna dan di Tengah */
#prof-current-avatar {
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.group:hover #prof-current-avatar {
    transform: scale(1.05);
}

/* Layout Kanan (Content) */
.glass-panel {
    /* Pastikan panel memiliki batas yang tegas dan shadow */
    box-shadow: 0 0 0 1px #333, 0 20px 50px rgba(0,0,0,0.9);
    background: #0f1216;
}

/* Tab Button Styling Update */
.tab-btn-simple {
    padding: 16px 0;
    font-size: 10px;
    letter-spacing: 1px;
    color: #555;
    background: linear-gradient(to bottom, #0b0f12, #111);
    transition: all 0.2s;
    border-right: 1px solid #222;
}
.tab-btn-simple:last-child { border-right: none; }
.tab-btn-simple:hover { color: #ccc; background: #1a1e24; }
.tab-btn-simple.active {
    color: #ff4655;
    background: #14181c;
    border-bottom: 2px solid #ff4655;
    box-shadow: inset 0 -10px 20px rgba(255, 70, 85, 0.05);
}

/* Input Fields di Settings */
.tac-input::placeholder { color: #444; text-transform: uppercase; font-size: 10px; }

/* Scrollbar di dalam Content Profile */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #ff4655; }

/* Animasi Masuk Modal */
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.animate-fade-in {
    animation: fadeInScale 0.2s cubic-bezier(0.2, 0, 0, 1) forwards;
}
/* === NEW PROFILE UI (IMPROVED) === */
.tab-btn-modern {
    background: transparent;
    border: none;
    color: #555;
    font-family: 'Syncopate';
    font-weight: bold;
    font-size: 9px;
    padding: 18px 0;
    cursor: pointer;
    transition: 0.3s;
    border-bottom: 2px solid transparent;
    letter-spacing: 2px;
}
.tab-btn-modern:hover { color: #ccc; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.02)); }
.tab-btn-modern.active { 
    color: var(--accent); 
    border-bottom-color: var(--accent); 
    background: linear-gradient(to bottom, transparent, rgba(255, 70, 85, 0.05));
    text-shadow: 0 0 10px rgba(255, 70, 85, 0.4);
}

.stat-box-modern {
    background: linear-gradient(145deg, #14181c, #0b0f12);
    border: 1px solid #222;
    padding: 20px 10px;
    text-align: center;
    border-radius: 6px;
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}
.stat-box-modern:hover { transform: translateY(-2px); border-color: #444; }
.stat-box-modern h4 { font-size: 24px; font-family: 'Syncopate'; font-weight: bold; color: white; margin: 0; line-height: 1; }
.stat-box-modern p { font-size: 8px; color: #768089; text-transform: uppercase; margin-top: 8px; letter-spacing: 1.5px; font-weight: bold; }

/* === SWIPE NOTIFICATION UPDATE === */
#tac-notify {
    touch-action: none; /* Mencegah scroll layar saat swipe notif */
    cursor: grab;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.1s linear, opacity 0.2s;
    user-select: none;
}
#tac-notify:active { cursor: grabbing; }

/* Visual Hint (Garis kecil di kanan notif) */
#tac-notify::after {
    content: '';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background-color: #444;
    border-radius: 2px;
    opacity: 0.5;
}
/* =========================================
   ANIMATION UPDATE: WIN EFFECTS & GLOWS
   ========================================= */

/* --- EPIC EFFECTS (Mistis/Ungu) --- */
.win-epic-anim {
    animation: epicPulse 2s infinite alternate;
}
.win-epic-bg {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(0,0,0,0) 70%);
}
@keyframes epicPulse {
    0% { filter: drop-shadow(0 0 10px #a855f7); transform: scale(1); }
    100% { filter: drop-shadow(0 0 25px #d8b4fe); transform: scale(1.05); }
}

/* --- LEGENDARY EFFECTS (Mewah/Emas/Intense) --- */
.win-legendary-anim {
    animation: legendaryEntrance 1.5s cubic-bezier(0, 0, 0.2, 1) forwards, 
               legendaryFloat 3s ease-in-out infinite 1.5s; /* Float setelah masuk */
    z-index: 50;
}

.win-legendary-bg {
    background: radial-gradient(circle, rgba(250, 204, 21, 0.6) 0%, rgba(0,0,0,0) 70%);
    animation: sunBurst 4s linear infinite;
}

/* Efek sinar berputar di belakang item legendary */
.legendary-rays {
    position: absolute; top: 50%; left: 50%;
    width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(250, 204, 21, 0.1) 20deg, transparent 40deg);
    transform: translate(-50%, -50%);
    animation: spinRays 10s linear infinite;
    z-index: 1; pointer-events: none;
}

@keyframes legendaryEntrance {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; filter: blur(20px); }
    60% { transform: scale(1.2) rotate(10deg); opacity: 1; filter: blur(0px); }
    80% { transform: scale(0.9) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes legendaryFloat {
    0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 20px #facc15); }
    50% { transform: translateY(-15px) scale(1.05); filter: drop-shadow(0 0 40px #fde047); }
}

@keyframes spinRays { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes sunBurst { 0% { opacity: 0.3; } 50% { opacity: 0.8; } 100% { opacity: 0.3; } }