:root { --bg-color: #050505; --glass-bg: rgba(20, 20, 20, 0.95); --border: rgba(255, 255, 255, 0.15); --text-main: #ffffff; --text-dim: #666; --font-ui: 'Inter', sans-serif; --font-mono: 'JetBrains Mono', monospace; --accent-color: #fff; }
body { background-color: var(--bg-color); 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: 50px 50px; color: var(--text-main); font-family: var(--font-ui); margin: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.ambient-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 800px; height: 800px; background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0) 70%); z-index: -1; pointer-events: none; }
.notification-stack { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); width: 300px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast-msg { display: flex; align-items: center; justify-content: center; background: rgba(20, 20, 20, 0.95); border: 1px solid var(--border); padding: 12px 25px; border-radius: 50px; box-shadow: 0 10px 40px rgba(0,0,0,0.8); opacity: 0; transform: translateY(-20px); transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); pointer-events: auto; color: #fff; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 1px; font-weight: 700; }
.toast-msg.visible { opacity: 1; transform: translateY(0); }
.pb-banner { display: flex; align-items: center; gap: 15px; background: rgba(255, 215, 0, 0.1); backdrop-filter: blur(12px); border: 1px solid rgba(255, 215, 0, 0.3); padding: 12px 25px; border-radius: 50px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); opacity: 0; transform: translateY(-20px); transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); pointer-events: auto; }
.pb-banner.visible { opacity: 1; transform: translateY(0); }
.pb-icon { font-size: 1.5rem; filter: drop-shadow(0 0 10px rgba(255,215,0,0.5)); }
.pb-text { display: flex; flex-direction: column; }
.pb-label { font-size: 0.65rem; color: #ffd700; letter-spacing: 1px; font-weight: 700; }
.pb-value { font-family: var(--font-mono); font-size: 1rem; color: #fff; text-shadow: 0 0 10px rgba(255,215,0,0.3); }
.tech-nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 40px; border-bottom: 1px solid var(--border); z-index: 100; }
.nav-left, .nav-right { flex: 1; display: flex; align-items: center; gap: 15px; }
.nav-right { justify-content: flex-end; }
.logo { flex: 1; text-align: center; font-family: var(--font-mono); font-weight: 700; letter-spacing: 2px; font-size: 1rem; }
.logo-accent { color: #444; margin: 0 5px; }
.icon-btn { background: transparent; border: none; color: #666; font-size: 1.1rem; cursor: pointer; transition: color 0.2s; }
.icon-btn:hover { color: #fff; }
.text-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: #fff; padding: 6px 16px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.75rem; cursor: pointer; transition: all 0.2s; letter-spacing: 1px; }
.text-btn:hover { background: #fff; color: #000; }
.nav-profile-btn { background: rgba(46, 204, 113, 0.1); border: 1px solid rgba(46, 204, 113, 0.3); color: #2ecc71; padding: 6px 16px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; cursor: pointer; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.nav-profile-btn:hover { background: rgba(46, 204, 113, 0.2); }
.main-container { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 20vh; position: relative; width: 100%; }
.scramble-wrapper { margin-bottom: 40px; text-align: center; position: relative; }
#scramble { background: rgba(10, 10, 10, 0.8); border: 1px solid var(--border); padding: 15px 30px; border-radius: 6px; font-family: var(--font-mono); font-size: 1.1rem; color: var(--text-main); letter-spacing: 1px; min-width: 400px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.timer-wrapper { text-align: center; position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; }
#timer-display { font-family: var(--font-mono); font-size: 16vw; max-font-size: 13rem; font-weight: 300; letter-spacing: -8px; line-height: 1; margin: 0; cursor: pointer; user-select: none; text-shadow: 0 0 50px rgba(255,255,255,0.05); transition: opacity 0.2s; }
@media (min-width: 1000px) { #timer-display { font-size: 11rem; } }
#timer-display.inspection { color: #FFA500; }
#timer-display.solving { color: #fff; }
.plus2-sup { font-size: 0.4em; vertical-align: top; color: #FFA500; margin-left: 5px; opacity: 0.8; letter-spacing: -2px; }
.dnf-val { color: #ff4d4d !important; letter-spacing: 1px !important; font-weight: 700; }
.history-row .plus2-sup { font-size: 0.7em; letter-spacing: -1px; }
.action-bar { display: flex; gap: 10px; margin-top: 10px; opacity: 0; transform: translateY(-10px); transition: all 0.3s; pointer-events: none; }
.action-bar.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.action-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: #888; padding: 6px 12px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.action-btn:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.1); }
.action-btn.active { background: #fff; color: #000; border-color: #fff; font-weight: bold; }
.delete-btn:hover { border-color: #ff4d4d; color: #ff4d4d; }
.status-indicator { margin-top: 15px; font-family: var(--font-mono); font-size: 0.7rem; color: #444; letter-spacing: 4px; text-transform: uppercase; }
.hud-stats { position: absolute; bottom: 80px; display: flex; gap: 60px; padding: 20px 40px; border-top: 1px solid transparent; }
.hud-item { display: flex; flex-direction: column; align-items: center; }
.hud-label { font-family: var(--font-mono); font-size: 0.75rem; color: #888; margin-bottom: 8px; letter-spacing: 2px; font-weight: 600; }
.hud-item b { font-family: var(--font-mono); font-size: 2.5rem; font-weight: 300; color: #fff; line-height: 1; text-shadow: 0 0 20px rgba(255,255,255,0.1); }
.hud-divider { width: 1px; background: #333; height: 50px; align-self: center; }
.ad-footer { position: fixed; bottom: 0; width: 100%; height: 50px; background: #050505; border-top: 1px solid var(--border); display: flex; justify-content: center; align-items: center; z-index: 50; }
.ad-content { font-family: var(--font-mono); font-size: 0.75rem; color: #666; }
.ad-indicator { display: inline-block; width: 6px; height: 6px; background: #2ecc71; border-radius: 50%; margin-right: 10px; box-shadow: 0 0 5px #2ecc71; }
.ad-link { color: #aaa; text-decoration: none; transition: opacity 0.2s; }
.ad-link:hover { color: #fff; }
.accent { color: #333; margin: 0 8px; }
.modal-backdrop { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); z-index: 200; }
.modal-glass { background: #0a0a0a; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 40px 100px rgba(0,0,0,0.9); animation: fadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.small-popup { width: 360px; margin: 15% auto; height: auto; max-height: 60vh; }
.large { width: 950px; max-width: 90%; height: 85vh; margin: 5vh auto; }
.modal-header.sticky { position: absolute; top: 0; left: 0; width: 100%; height: 60px; background: rgba(10, 10, 10, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; padding: 0 25px; z-index: 10; box-sizing: border-box; }
.modal-header h2 { font-size: 0.8rem; font-weight: 600; margin: 0; letter-spacing: 2px; color: #fff; }
.close-btn { font-size: 1.2rem; color: #666; background: none; border: none; cursor: pointer; transition: color 0.2s; }
.close-btn:hover { color: #fff; }
.modal-scroll-content { overflow-y: auto; height: 100%; width: 100%; padding: 75px 30px 30px 30px; box-sizing: border-box; }
.modal-scroll-content::-webkit-scrollbar { width: 6px; }
.modal-scroll-content::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.setting-row:last-of-type { border-bottom: none; }
.setting-info { display: flex; flex-direction: column; }
.setting-title { font-size: 0.9rem; font-weight: 500; color: #fff; letter-spacing: 0.5px; }
.setting-desc { font-size: 0.75rem; color: #666; margin-top: 4px; }
.switch { position: relative; display: inline-block; width: 52px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: transparent; border: 2px solid #444; border-radius: 30px; transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1); }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 2px; bottom: 2px; background-color: #666; border-radius: 50%; transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1); box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
input:checked + .slider { background-color: #fff; border-color: #fff; }
input:checked + .slider:before { transform: translateX(24px); background-color: #000; }
.switch:hover .slider { border-color: #666; }
.minimal-input { background: transparent; border: none; border-bottom: 2px solid #333; color: #fff; font-family: var(--font-mono); width: 60px; text-align: center; font-size: 1.1rem; padding: 5px; transition: border-color 0.2s; }
.minimal-input:focus { outline: none; border-color: #fff; }
.text-danger { background: rgba(255, 50, 50, 0.05); border: 1px solid rgba(255, 50, 50, 0.2); color: #ff4d4d; font-size: 0.8rem; padding: 12px; border-radius: 6px; cursor: pointer; width: 100%; text-align: center; font-weight: 600; transition: background 0.2s; }
.text-danger:hover { background: rgba(255, 50, 50, 0.1); }
.auth-tabs { display: flex; border-bottom: 1px solid #333; margin-bottom: 20px; }
.auth-tab { flex: 1; background: transparent; border: none; color: #666; padding: 10px; font-family: var(--font-mono); font-size: 0.8rem; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; }
.auth-tab:hover { color: #fff; }
.auth-tab.active { color: #fff; border-bottom: 2px solid #fff; font-weight: bold; }
.auth-form { display: none; flex-direction: column; gap: 5px; }
.auth-form.visible { display: flex; animation: fadeUp 0.3s ease-out; }
.auth-form .input-group { background: #1a1a1a; border: 1px solid #333; padding: 12px; border-radius: 6px; margin-bottom: 12px; display: flex; align-items: center; }
.input-group i { color: #666; margin-right: 12px; font-size: 0.9rem; }
.input-group input { background: transparent; border: none; color: #fff; width: 100%; outline: none; font-size: 0.95rem; }
.cta-btn { width: 100%; padding: 14px; margin-top: 10px; background: #fff; color: #000; border: none; border-radius: 6px; font-weight: 700; cursor: pointer; font-size: 0.9rem; letter-spacing: 1px; transition: transform 0.1s; }
.auth-note { text-align: center; font-size: 0.75rem; color: #666; margin-top: 15px; }
.auth-note a { color: #fff; text-decoration: none; }
.graph-controls { display: flex; gap: 8px; margin-bottom: 10px; justify-content: center; }
.graph-btn { background: #111; border: 1px solid #333; color: #666; padding: 6px 14px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.75rem; cursor: pointer; }
.graph-btn:hover { border-color: #666; }
.graph-btn.active { background: #fff; color: #000; border-color: #fff; }
.custom-graph-wrapper { display: inline-block; position: relative; }
.custom-input-hidden { display: none; width: 60px; background: #111; border: 1px solid #fff; color: #fff; border-radius: 4px; padding: 6px; font-family: var(--font-mono); font-size: 0.75rem; text-align: center; }
.custom-input-hidden:focus { outline: none; }
.chart-wrapper { width: 100%; height: 230px; }
.data-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 15px; }
.data-card { background: #0f0f0f; padding: 12px; border-radius: 6px; text-align: center; border: 1px solid #222; }
.data-card h3 { font-size: 0.6rem; color: #555; margin: 0; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; }
.data-card p { font-family: var(--font-mono); font-size: 1.3rem; margin: 2px 0 0; color: #fff; }
.history-section { margin-top: 15px; border-top: 1px solid #222; padding-top: 15px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.history-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.history-top-bar h3 { font-size: 0.75rem; color: #666; letter-spacing: 1px; margin: 0; }
.sort-controls { display: flex; align-items: center; gap: 10px; font-size: 0.7rem; color: #666; }
.sort-btn { background: transparent; border: 1px solid #333; color: #666; padding: 2px 8px; border-radius: 4px; cursor: pointer; font-size: 0.7rem; }
.sort-btn.active { background: #333; color: #fff; border-color: #555; }
.history-header { display: flex; padding: 10px; border-bottom: 1px solid #222; font-family: var(--font-mono); font-size: 0.7rem; color: #555; text-transform: uppercase; }
.history-list { overflow-y: auto; flex: 1; }
.history-row { display: flex; padding: 10px; border-bottom: 1px solid #151515; font-family: var(--font-mono); font-size: 0.8rem; color: #bbb; transition: background 0.1s; }
.history-row:hover { background: #111; }
body.running .tech-nav, body.running .hud-stats, body.running .ad-footer, body.running .scramble-wrapper, body.running .action-bar { opacity: 0; transition: opacity 0.3s; }
body.running.hide-timer-on #timer-display { opacity: 0; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(40px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.google-btn { background: transparent; border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; width: 100%; padding: 12px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 10px; letter-spacing: 1px; margin-top: 10px; }
.google-btn:hover { background: #fff; color: #000; border-color: #fff; }
.auth-divider { text-align: center; margin: 15px 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: rgba(255, 255, 255, 0.1); z-index: 1; }
.auth-divider span { background: #0a0a0a; padding: 0 10px; color: #444; font-size: 0.7rem; position: relative; z-index: 2; font-family: var(--font-mono); }

.profile-layout { text-align: center; }
.profile-top-row { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.03); padding: 15px; border-radius: 8px; border: 1px solid #222; margin-bottom: 20px; }
.profile-info-left { display: flex; align-items: center; gap: 15px; }
.profile-avatar { width: 45px; height: 45px; background: #111; border: 1px solid #333; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.profile-text h1 { font-size: 1rem; margin: 0; color: #fff; letter-spacing: 1px; font-weight: 700; text-align: left; }
.join-date { display: block; font-family: var(--font-mono); font-size: 0.65rem; color: #666; text-align: left; margin-top: 2px; }
.mini-logout-btn { background: rgba(255, 50, 50, 0.1); border: 1px solid rgba(255, 50, 50, 0.3); color: #ff4d4d; width: 35px; height: 35px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.mini-logout-btn:hover { background: #ff4d4d; color: #000; }
.remove-friend-btn { background: rgba(255, 50, 50, 0.1); border: 1px solid rgba(255, 50, 50, 0.3); color: #ff4d4d; width: 35px; height: 35px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.remove-friend-btn:hover { background: #ff4d4d; color: #000; }

.league-container.compact { padding: 15px; background: #0a0a0a; margin-bottom: 15px; border: 1px solid #222; border-radius: 8px; }
.league-label { font-size: 0.6rem; color: #555; letter-spacing: 2px; margin-bottom: 5px; }
.league-badge { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 800; letter-spacing: 2px; text-shadow: 0 0 20px rgba(255,255,255,0.2); margin: 5px 0; }
.league-sub { font-size: 0.7rem; color: #444; margin-top: 5px; font-family: var(--font-mono); }
.rank-rookie { color: #A0A0A0; }
.rank-intermediate { color: #CD7F32; text-shadow: 0 0 10px rgba(205, 127, 50, 0.4); }
.rank-advanced { color: #00CEC9; text-shadow: 0 0 15px rgba(0, 206, 201, 0.4); }
.rank-expert { color: #6C5CE7; text-shadow: 0 0 20px rgba(108, 92, 231, 0.5); }
.rank-master { color: #FD79A8; text-shadow: 0 0 25px rgba(253, 121, 168, 0.5); }
.rank-grandmaster { color: #FFD700; text-shadow: 0 0 30px rgba(255, 215, 0, 0.6); }
.rank-quantum { background: linear-gradient(to right, #00f260, #0575E6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 900; }

.profile-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 25px; }
.p-stat { background: #111; padding: 10px; border-radius: 4px; display: flex; flex-direction: column; }
.p-stat .label { font-size: 0.6rem; color: #555; }
.p-stat .value { font-family: var(--font-mono); font-size: 1.1rem; color: #fff; }

.tech-search-wrapper { position: relative; display: flex; align-items: center; margin-bottom: 20px; border-bottom: 2px solid #333; transition: border-color 0.3s; }
.tech-search-wrapper:focus-within { border-color: #fff; }
.search-icon { position: absolute; left: 10px; color: #666; font-size: 0.9rem; }
.tech-input { width: 100%; flex: 1; background: transparent; border: none; padding: 12px 12px 12px 35px; color: #fff; font-family: var(--font-mono); font-size: 0.9rem; outline: none; }
.tech-input::placeholder { color: #444; }
.search-btn { background: #222; color: #fff; border: none; width: 40px; cursor: pointer; font-size: 0.9rem; transition: 0.2s; }
.search-btn:hover { background: #fff; color: #000; }

.friend-list { display: flex; flex-direction: column; gap: 8px; }
.friend-item { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.02); border: 1px solid #222; padding: 10px 15px; border-radius: 4px; cursor: pointer; transition: all 0.2s; }
.friend-item:hover { border-color: #444; background: rgba(255,255,255,0.05); transform: translateX(5px); }
.friend-name { font-size: 0.85rem; letter-spacing: 0.5px; }
.empty-state { text-align: center; font-family: var(--font-mono); font-size: 0.75rem; color: #444; margin-top: 10px; letter-spacing: 1px; }
.section-title { font-size: 0.65rem; color: #555; letter-spacing: 2px; margin-bottom: 10px; font-weight: bold; margin-top: 10px; }

.request-actions { display: flex; gap: 8px; }
.accept-btn { background: rgba(46, 204, 113, 0.1); border: 1px solid rgba(46, 204, 113, 0.3); color: #2ecc71; padding: 5px; border-radius: 4px; cursor: pointer; }
.accept-btn:hover { background: rgba(46, 204, 113, 0.3); }
.decline-btn { background: rgba(255, 50, 50, 0.1); border: 1px solid rgba(255, 50, 50, 0.3); color: #ff4d4d; padding: 5px; border-radius: 4px; cursor: pointer; }
.decline-btn:hover { background: rgba(255, 50, 50, 0.3); }
