:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #f59e0b; /* Amber/Gold */
    --primary-glow: rgba(245, 158, 11, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Blobs */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}
.shape1 { width: 500px; height: 500px; background: #3b82f6; top: -100px; left: -100px; }
.shape2 { width: 400px; height: 400px; background: #8b5cf6; bottom: -50px; right: -50px; animation-delay: -5s; }
.shape3 { width: 600px; height: 600px; background: #0f766e; top: 40%; left: 30%; animation-delay: -10s; opacity: 0.3; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Header */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(to right, #f8fafc, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 9999px;
    width: 250px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
    width: 300px;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 34px;
    transition: var(--transition);
}

.slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}

input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:checked + .slider::before {
    transform: translateX(20px);
    background-color: white;
}

.label-text {
    font-size: 0.9rem;
    color: var(--text-main);
    user-select: none;
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 100px auto 2rem;
    padding: 0 2rem;
}

/* Hero Grid */
.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.hero-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
}

.hero-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 15px var(--primary-glow);
}

.hero-avatar-wrapper {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.hero-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.hero-card:hover .hero-avatar {
    transform: scale(1.05);
}

.hero-info {
    padding: 1rem;
    text-align: center;
}

.hero-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.hero-title {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.role-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(255,255,255,0.1);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.glass-panel {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    position: relative;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.modal-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
    border-radius: 24px;
}

.modal-left {
    flex: 1;
    position: relative;
    background: #000;
}

.skin-showcase {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.skin-showcase.loaded {
    opacity: 1;
}

.skin-name-badge {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-right {
    width: 450px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to right, rgba(15,23,42,0.9), rgba(15,23,42,1));
    border-left: 1px solid var(--glass-border);
}

.hero-header {
    margin-bottom: 1rem;
}

.hero-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.hero-header .hero-title {
    font-size: 1.2rem;
    font-weight: 300;
}

.hero-roles {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.hero-roles .role-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--primary);
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 0;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--primary);
    font-weight: 700;
}

.tab-btn.active::after {
    width: 100%;
}

.tab-content {
    display: none;
    flex: 1;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.tab-content.scrollable {
    overflow-y: auto;
    padding-right: 1rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

/* Skins Grid inside Modal */
.skins-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    overflow-y: auto;
    max-height: calc(85vh - 250px);
    padding-right: 0.5rem;
}

.skin-thumb-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: var(--transition);
}

.skin-thumb-card:hover {
    transform: scale(1.05);
}

.skin-thumb-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.skin-thumb-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.skin-thumb-card .skin-thumb-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 0.5rem;
    font-size: 0.8rem;
    text-align: center;
}

/* Story and Skills */
.story-section h3, .history-section h3 {
    color: var(--primary);
    margin: 1.5rem 0 0.5rem;
    font-size: 1.1rem;
}

.story-section p, .history-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
    white-space: pre-wrap;
}

.skill-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    border-radius: 12px;
}

.skill-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
}

.skill-info h4 {
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.skill-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.skill-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #cbd5e1;
}

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

/* Responsive */
@media (max-width: 900px) {
    .modal-layout { flex-direction: column; }
    .modal-right { width: 100%; height: 50%; }
    .modal-left { height: 50%; }
    .skin-name-badge { font-size: 1.2rem; }
}

.hidden {
    display: none !important;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
    font-size: 1.2rem;
}
