:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: rgba(18, 18, 18, 0.6);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #e5e5e5;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --text-muted: rgba(255, 255, 255, 0.35);
    --accent-soft: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition-smooth: all 0.2s ease-out;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-primary) !important;
    color: var(--text-primary);
}

body::before {
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.02) 0%, transparent 60%) !important;
    opacity: 0.5;
}

.page-title,
.title,
.holographic-title,
.welcome-title,
h1.page-title {
    background: linear-gradient(180deg, #ffffff 0%, #b0b0b0 100%) !important;
    background-size: 100% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    animation: none !important;
    filter: none !important;
    text-shadow: none !important;
}

.section-title {
    color: var(--text-primary) !important;
    filter: none !important;
}

.search-bar,
input[type="text"],
input[type="search"],
textarea,
select {
    background: rgba(20, 20, 20, 0.95) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    transition: var(--transition-smooth) !important;
}

.search-bar:focus,
input[type="text"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    border-color: var(--border-hover) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.03) !important;
    transform: none !important;
}

.search-bar::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
}

.game-card,
.app-card,
.setting-item,
.contact-container {
    background: rgba(20, 20, 20, 0.9) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-soft) !important;
    transition: var(--transition-smooth) !important;
}

.game-card:hover,
.app-card:hover,
.setting-item:hover {
    transform: translateY(-4px) !important;
    border-color: var(--border-hover) !important;
    box-shadow: var(--shadow-hover) !important;
}

.game-card::before,
.app-card::before {
    display: none !important;
}

.game-image {
    border-radius: var(--radius-lg) !important;
    transition: var(--transition-smooth) !important;
}

.game-card:hover .game-image {
    filter: blur(3px) brightness(0.7) !important;
}

.game-info {
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%) !important;
}

.game-title {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}

button,
.btn,
.cloak-button,
.nav-btn {
    background: rgba(25, 25, 25, 0.95) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    transition: var(--transition-smooth) !important;
    font-weight: 500 !important;
}

button:hover,
.btn:hover,
.cloak-button:hover,
.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--border-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

button:active,
.btn:active,
.cloak-button:active,
.nav-btn:active {
    transform: translateY(0) !important;
}

.toggle-switch {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 20px !important;
}

.toggle-switch.active {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.toggle-slider {
    background: linear-gradient(180deg, #e0e0e0 0%, #c0c0c0 100%) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

.browser-header,
.nav-bar,
header {
    background: rgba(12, 12, 12, 0.98) !important;
    border: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
    border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
}

.browser-header::before,
.welcome-screen::before {
    display: none !important;
}

.welcome-screen,
.popup,
.modal,
#voidWarningPopup,
#performancePopupOverlay > div {
    background: rgba(15, 15, 15, 0.98) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6) !important;
}

.browser-iframe {
    border-radius: var(--radius-md) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

.url-bar,
.url-input {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary) !important;
}

.url-bar:focus,
.url-input:focus {
    border-color: var(--border-hover) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03) !important;
}

.particle,
.particles {
    opacity: 0.4 !important;
}

.search-icon,
.icon {
    color: var(--text-muted) !important;
    filter: none !important;
    transition: var(--transition-smooth) !important;
}

.search-bar:focus + .search-icon {
    color: var(--text-secondary) !important;
}

.loading,
.no-results {
    color: var(--text-secondary) !important;
    filter: none !important;
}

.no-results h2 {
    color: var(--text-primary) !important;
    filter: none !important;
}

a {
    color: var(--text-primary) !important;
    transition: var(--transition-smooth) !important;
}

a:hover {
    color: #ffffff !important;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

::selection {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.tab-mask-select,
.tab-mask-select option {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.user-id-display {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
}

.user-id-text {
    color: rgba(120, 255, 120, 0.8) !important;
}

#debugInfo {
    color: var(--text-secondary) !important;
}

#void-announcement-banner {
    background: rgba(15, 15, 15, 0.98) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5) !important;
    animation: slideInSmooth 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes slideInSmooth {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ads-container,
.side-ad {
    opacity: 0.9;
}

.iframe-loading-overlay {
    background: var(--bg-primary) !important;
}

.iframe-loading-spinner {
    border-color: var(--border-subtle) !important;
    border-top-color: var(--text-secondary) !important;
}

@keyframes gentleGlow {
    0%, 100% { opacity: 1; }
}

.warning-title {
    color: #ff6b6b !important;
}

.btn-discord {
    background: rgba(88, 101, 242, 0.2) !important;
    border: 1px solid rgba(88, 101, 242, 0.3) !important;
}

.btn-discord:hover {
    background: rgba(88, 101, 242, 0.3) !important;
}

.btn-continue {
    background: rgba(34, 197, 94, 0.2) !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    color: #22c55e !important;
}

.btn-continue:hover {
    background: rgba(34, 197, 94, 0.3) !important;
}

.perf-mode-btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
}

.perf-mode-btn:hover {
    border-color: var(--border-hover) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.perf-mode-btn.active {
    border-color: rgba(34, 197, 94, 0.4) !important;
    background: rgba(34, 197, 94, 0.1) !important;
}

.section-title {
    border-bottom-color: var(--border-subtle) !important;
}

@media (max-width: 768px) {
    :root {
        --radius-sm: 10px;
        --radius-md: 14px;
        --radius-lg: 18px;
        --radius-xl: 22px;
    }
    
    body {
        background: var(--bg-primary) !important;
    }
    
    body::before {
        background: none !important;
    }
}

@media (max-width: 480px) {
    .game-card,
    .app-card,
    .setting-item {
        background: rgba(20, 20, 20, 0.95) !important;
    }
}
