@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Permanent+Marker&family=Syncopate:wght@400;700&display=swap');

:root {
    --primary-neon: #00d2ff;
    --primary-glow: rgba(0, 210, 255, 0.6);
    --bg-dark: #0a0a0a;
    --bg-card: rgba(15, 15, 15, 0.8);
    --text-color: #ffffff;
    --text-muted: #888888;
    --accent-color: #ffd700;
    --gang-font: 'Syncopate', sans-serif;
    --marker-font: 'Permanent+Marker', cursive;
    --cyber-font: 'Orbitron', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-color);
    overflow-x: hidden;
    height: 100vh;
}

#bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('https://images.unsplash.com/photo-1550684848-fac1c5b4e853?q=80&w=2070&auto=format&fit=crop'); 
    background-size: cover;
    background-position: center;
    z-index: -2;
    transition: background-image 0.5s ease-in-out;
}

#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
    animation: float 15s infinite linear;
}

.particle::after {
    display: none; /* Removed the default clover */
}

/* Admin Dashboard Redesign */
.admin-container {
    padding: clamp(1rem, 5vw, 4rem) clamp(0.5rem, 3vw, 2rem);
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}

.login-header, .admin-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.login-header i, .admin-title i {
    font-size: 3rem;
    color: var(--primary-neon);
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
}

.input-wrap input {
    padding-left: 3rem;
    width: 100%;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.tab-btn.active {
    background: var(--primary-neon);
    color: #000;
    box-shadow: 0 0 20px var(--primary-glow);
}

.admin-tab-content {
    animation: fadeIn 0.4s ease-out;
}

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

.admin-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--primary-neon);
}

.member-list-scroll {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto; /* Prevents horizontal overflow on small phones */
    margin-top: 1rem;
    padding-right: 0.5rem;
}

.member-list-scroll::-webkit-scrollbar {
    width: 6px;
}

.member-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.horizontal-group {
    flex-direction: row !important;
    gap: 1rem;
}

.success-btn { background: #00c853; color: #fff; }
.success-btn:hover { background: #00e676; box-shadow: 0 0 15px rgba(0, 200, 83, 0.4); }

.primary-btn { background: var(--primary-neon); color: #000; }
.secondary-btn { background: rgba(255, 255, 255, 0.1); color: #fff; }
.secondary-btn:hover { background: rgba(255, 255, 255, 0.2); }

.logout-btn {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.logout-btn:hover {
    background: #ff4444;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.4);
}

/* Enhanced Table Styling */
table {
    border-radius: 12px;
    overflow: hidden;
}

thead th {
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

td {
    font-size: 0.9rem;
}

.admin-member-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translate(100px, -100vh) rotate(360deg); opacity: 0; }
}

/* Enhanced Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 6000; /* Higher than mobile menu (5000) */
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0;
    transition: 0.3s;
}

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

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

#nav-site-logo {
    height: 45px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.nav-brand-name {
    font-family: var(--cyber-font);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 4px;
    color: #fff;
}

.nav-links-desktop {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--cyber-font);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn i { font-size: 0.9rem; }

.nav-btn:hover, .nav-btn.active {
    background: var(--primary-neon);
    color: #000;
    box-shadow: 0 0 20px var(--primary-glow);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.admin-access-btn {
    width: 45px;
    height: 45px;
    padding: 0;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle .bar {
    width: 25px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

/* Hero V2 Redesign */
.hero-v2 {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 2rem 4rem;
    overflow: hidden;
}

.hero-background-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.floating-cube {
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, var(--primary-neon), transparent);
    opacity: 0.05;
    filter: blur(50px);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphing 15s infinite alternate;
}

.floating-cube:nth-child(1) { top: 10%; left: 10%; }
.floating-cube:nth-child(2) { bottom: 10%; right: 10%; animation-delay: -5s; }

@keyframes morphing {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(0deg) scale(1); }
    100% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: rotate(180deg) scale(1.2); }
}

.hero-main-content {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.hero-logo-box {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-img {
    width: 100%;
    max-width: 450px;
    filter: drop-shadow(0 0 30px var(--primary-glow));
    animation: heroLogoFloat 5s ease-in-out infinite;
    z-index: 2;
}

@keyframes heroLogoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

.logo-inner-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.4;
    filter: blur(30px);
    z-index: 1;
}

.hero-text-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.3);
    color: var(--primary-neon);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-family: var(--cyber-font);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    width: fit-content;
    text-transform: uppercase;
    box-shadow: inset 0 0 10px rgba(0, 210, 255, 0.1);
}

.hero-main-title {
    font-family: var(--cyber-font);
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -2px;
}

.hero-main-title .highlight {
    color: var(--primary-neon);
    text-shadow: 0 0 30px var(--primary-glow);
    display: block;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin: 1rem 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-num {
    font-family: var(--cyber-font);
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    font-weight: 700;
}

.hero-stats .divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.hero-cta {
    padding: 1.2rem 2.5rem;
    border-radius: 4px;
    font-family: var(--cyber-font);
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-cta.primary {
    background: var(--primary-neon);
    color: #000;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.3);
}

.hero-cta.secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-cta:hover {
    transform: translateY(-5px) scale(1.02);
}

.hero-cta.primary:hover {
    box-shadow: 0 20px 40px rgba(0, 210, 255, 0.5);
}

.hero-cta.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-neon);
}

/* Mobile Menu Styles Perfectly Centered */
.nav-links-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 9999; /* Higher than everything */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    transform: translateX(100%);
    transition: 0.5s cubic-bezier(0.85, 0, 0.15, 1);
    padding: 2rem;
}

.nav-links-mobile.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.mobile-nav-header img { 
    width: 85px; 
    filter: drop-shadow(0 0 15px var(--primary-glow));
}

.mobile-nav-header span { 
    font-family: var(--cyber-font); 
    letter-spacing: 6px; 
    color: var(--primary-neon);
    font-size: 1rem;
    font-weight: 900;
    text-shadow: 0 0 10px var(--primary-glow);
}

.nav-btn-mobile {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: var(--cyber-font);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 90%;
    max-width: 350px;
    padding: 1.4rem;
    border-radius: 16px;
    text-align: center;
    text-transform: uppercase;
}

.nav-btn-mobile:active {
    background: var(--primary-neon);
    color: #000;
    transform: scale(0.95);
    box-shadow: 0 0 30px var(--primary-glow);
}

.nav-btn-mobile.admin-btn {
    border-color: var(--primary-neon);
    color: var(--primary-neon);
    margin-top: 2rem;
    font-size: 1rem;
}

.mobile-nav-footer {
    position: absolute;
    bottom: 3rem;
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--primary-neon);
    opacity: 0.6;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
}

/* Members Redesign */
.members-container {
    padding: 120px 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.group-title {
    font-family: var(--cyber-font);
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    letter-spacing: 2px;
}

.group-title .count {
    font-size: 0.75rem;
    background: var(--primary-neon);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: 900;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 6rem;
}

.member-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: visible;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    perspective: 1000px;
}

.member-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-neon);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 210, 255, 0.1);
}

.card-inner {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    padding: 4px;
    background: linear-gradient(180deg, var(--primary-neon), transparent);
    border-radius: 50%;
}

.avatar-frame {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: 5;
    pointer-events: none;
}

.member-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #0a0a0a;
}

.status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: #3ba55d; /* Discord Online Color */
    border: 4px solid #0a0a0a;
    border-radius: 50%;
}

.status-text {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: -0.5rem;
    min-height: 1.2rem;
}

#discord-bot-token-input {
    letter-spacing: 2px;
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.member-name {
    font-family: var(--cyber-font);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

.member-handle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.member-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge.role-badge { background: rgba(0, 210, 255, 0.1); color: var(--primary-neon); border: 1px solid rgba(0, 210, 255, 0.2); }
.badge.premium-badge { background: rgba(255, 215, 0, 0.1); color: var(--accent-color); border: 1px solid rgba(255, 215, 0, 0.2); }

/* Member Card Overlay (Discord Style) */
.member-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111214; /* Discord Dark */
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateY(10px);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.member-card:hover .member-card-overlay {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.overlay-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.overlay-header .avatar-wrapper {
    width: 60px;
    height: 60px;
    padding: 2px;
}

.overlay-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.overlay-info {
    display: flex;
    flex-direction: column;
}

.overlay-name { font-weight: 800; color: #fff; font-size: 1rem; }
.overlay-handle { font-size: 0.75rem; color: var(--text-muted); }

.overlay-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.overlay-body .label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.overlay-body p {
    font-size: 0.8rem;
    color: #dbdee1;
    line-height: 1.4;
    margin-top: 0.3rem;
}

.overlay-footer {
    margin-top: auto;
}

.view-profile-btn {
    width: 100%;
    background: #5865f2; /* Discord Blurple */
    color: #fff;
    border: none;
    padding: 0.8rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.view-profile-btn:hover { background: #4752c4; }

/* Admin Panel Section Overrides - Consolidating for Fluidity */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: clamp(1rem, 3vw, 2.5rem);
    margin-top: 2rem;
    width: 100%;
}

.admin-card, .login-card {
    background: var(--bg-card);
    padding: clamp(1rem, 4vw, 2.5rem);
    border-radius: clamp(12px, 2vw, 20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow: hidden;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
    margin-top: 1rem;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: -0.5rem;
}

/* Form Elements Universal Fixes */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    background: #111 !important; /* Force solid dark background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white !important;
    padding: 0.8rem;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    outline: none;
}

select option {
    background: #111;
    color: white;
}

textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.action-btn {
    background: var(--primary-neon);
    color: black;
    border: none;
    padding: clamp(0.6rem, 2vw, 1rem) clamp(1rem, 3vw, 2rem);
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.action-btn:hover {
    background: #00cc00;
}

/* Widgets */
.bottom-widgets {
    position: fixed;
    bottom: 2rem;
    width: 100%;
    padding: 0 2rem;
    display: flex;
    justify-content: flex-end; /* Align music player to the right */
    align-items: flex-end;
    pointer-events: none;
}

.bottom-widgets > * {
    pointer-events: auto;
}

.hero-badge-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.hero-clock {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-neon);
    text-shadow: 0 0 10px var(--primary-glow);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#clock-time { font-size: 1.2rem; font-weight: bold; }
#clock-date { font-size: 0.75rem; opacity: 0.7; }

@media (max-width: 768px) {
    .hero-badge-row {
        justify-content: center;
    }
}

.music-player-container {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 9999;
}

.music-player-container.hidden-player {
    transform: none;
}

.music-player-container .music-player {
    transition: all 0.6s cubic-bezier(0.85, 0, 0.15, 1);
}

.music-player-container.hidden-player .music-player {
    transform: translateX(calc(100% + 50px));
    opacity: 0;
    pointer-events: none;
}

.music-toggle-btn {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary-neon);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: 0.3s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.music-player-container.hidden-player .music-toggle-btn i {
    transform: rotate(180deg);
}

.music-toggle-btn:hover {
    background: var(--primary-neon);
    color: black;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Music Player Redesign */
.music-player {
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.2rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    width: 480px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8),
                inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.player-visualizer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
    pointer-events: none;
}

#visualizer-canvas {
    width: 100%;
    height: 100%;
}

.player-disc-wrap {
    position: relative;
    z-index: 1;
}

.player-disc {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #222 30%, #111 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #000;
    box-shadow: 0 0 20px rgba(0,0,0,0.5), 0 0 0 2px rgba(255,255,255,0.05);
    position: relative;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-disc::before {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.05);
    background: repeating-radial-gradient(circle, transparent 0, transparent 2px, rgba(255,255,255,0.02) 3px);
}

.player-disc.playing {
    animation: spin 3s linear infinite;
}

.player-disc.paused {
    animation-play-state: paused;
}

.disc-inner {
    width: 24px;
    height: 24px;
    background: #000;
    border-radius: 50%;
    border: 2px solid var(--primary-neon);
    z-index: 2;
    box-shadow: inset 0 0 10px var(--primary-neon);
}

.disc-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0;
    transition: 0.5s;
}

.player-disc.playing .disc-glow {
    opacity: 0.3;
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    from { transform: scale(0.95); opacity: 0.2; }
    to { transform: scale(1.1); opacity: 0.4; }
}

.player-content { 
    flex: 1; 
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.track-info { display: flex; flex-direction: column; }
.track-name { font-size: 1rem; font-weight: 800; color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
.artist-name { font-size: 0.75rem; color: var(--primary-neon); opacity: 0.8; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.progress-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.progress-bar { 
    flex: 1;
    height: 6px; 
    background: rgba(255, 255, 255, 0.05); 
    border-radius: 10px; 
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill { 
    width: 0%; 
    height: 100%; 
    background: linear-gradient(90deg, var(--primary-neon), #fff); 
    border-radius: 10px; 
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width 0.1s linear;
}

.player-controls { 
    display: flex; 
    gap: 1rem; 
    align-items: center;
    justify-content: flex-start;
}

.ctrl-btn { 
    background: none; 
    border: none; 
    color: #fff; 
    cursor: pointer; 
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn:hover { opacity: 1; transform: scale(1.1); color: var(--primary-neon); }

.play-btn { 
    background: #fff; 
    color: #000; 
    width: 42px; 
    height: 42px; 
    border-radius: 50%; 
    opacity: 1;
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

.play-btn:hover {
    background: var(--primary-neon);
    color: #000;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(1.1);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.volume-slider-wrap {
    width: 0;
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    align-items: center;
}

.volume-control:hover .volume-slider-wrap {
    width: 80px;
}

#volume-slider {
    width: 80px;
    height: 4px;
    cursor: pointer;
    accent-color: var(--primary-neon);
}

/* Glassmorphism Sections */
.content-section {
    padding-top: 2rem;
}

.admin-card, .member-card {
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}



@keyframes spin { 
    from { transform: rotate(0deg); } 
    to { transform: rotate(360deg); } 
}

/* --- SUPER RESPONSIVE CORE FIXES --- */

/* Base Layout Constraints */
body, html {
    width: 100%;
    overflow-x: hidden;
}

#app {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* 1. Global Container Fixes */
.nav-container, 
.hero-main-content, 
.members-container, 
.admin-container {
    width: 100% !important;
    padding-left: clamp(1rem, 5vw, 2.5rem) !important;
    padding-right: clamp(1rem, 5vw, 2.5rem) !important;
    margin: 0 auto !important;
}

/* 2. Super Responsive Member Grid */
.member-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)) !important;
    gap: clamp(1rem, 3vw, 2.5rem) !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 0 !important;
}

/* 3. Universal Member Card Fix */
.member-card {
    width: 100% !important;
    max-width: 350px !important;
    aspect-ratio: 3/4 !important;
    min-height: auto !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 4. Fluid Typography & Elements */
.hero-main-title {
    font-size: clamp(2rem, 10vw, 4.5rem) !important;
}

.hero-description {
    font-size: clamp(0.9rem, 2vw, 1.1rem) !important;
    width: 100% !important;
}

.stat-num {
    font-size: clamp(1.2rem, 5vw, 1.8rem) !important;
}

/* 5. Mobile Specific Overrides (Super Clean) */
@media (max-width: 768px) {
    .hero-main-content {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        padding-top: 2rem !important;
    }

    .hero-logo-img {
        max-width: 60% !important;
        margin: 0 auto !important;
    }

    .hero-stats {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 1.5rem !important;
    }

    .hero-buttons {
        width: 100% !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .hero-cta {
        width: 100% !important;
        max-width: 300px !important;
    }

    /* Music Player & Clock - Prevent Clashes */
    .bottom-widgets {
        flex-direction: column-reverse !important;
        align-items: center !important;
        gap: 1rem !important;
        padding: 0 1rem 1rem !important;
    }

    .music-player {
        width: 100% !important;
        max-width: 400px !important;
    }

    .clock-widget {
        text-align: center !important;
    }

    /* 7. Music Player Super Responsive Fixes */
    .bottom-widgets {
        flex-direction: column-reverse !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    .music-player-container {
        width: 100% !important;
        display: flex !important;
        flex-direction: column-reverse !important; /* Change to column-reverse to put button on top */
        align-items: center !important;
        position: fixed !important;
        bottom: 1rem !important;
        left: 0 !important;
        z-index: 9000 !important;
        pointer-events: none !important;
        /* Critical: Reset transform to prevent containing block issue for position:fixed button */
        transform: none !important;
    }

    /* Reset hidden state for the container on mobile, we only hide the inner .music-player */
    .music-player-container.hidden-player {
        transform: none !important;
    }

    .music-player {
        width: 92% !important;
        max-width: 380px !important;
        padding: 0.5rem 0.8rem !important;
        gap: 0.6rem !important;
        border-radius: 20px !important;
        background: rgba(10, 10, 10, 0.95) !important;
        backdrop-filter: blur(25px) !important;
        border: 1px solid var(--primary-neon) !important;
        pointer-events: auto !important;
        transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1) !important;
    }

    /* Move player out of screen when hidden */
    .music-player-container.hidden-player .music-player {
        transform: translateY(calc(100% + 100px)) !important;
    }

    /* Floating Toggle Button - Always Visible and Independent */
    .music-toggle-btn {
        display: flex !important;
        pointer-events: auto !important;
        z-index: 20000 !important; /* Extremely high z-index */
        justify-content: center !important;
        align-items: center !important;
        transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* When Hidden: Neon Circle Floating on Right - Robust for Small Phones */
    .music-player-container.hidden-player .music-toggle-btn {
        position: fixed !important;
        bottom: clamp(1rem, 5vh, 2rem) !important;
        right: clamp(1rem, 5vw, 2rem) !important;
        width: clamp(45px, 12vw, 55px) !important;
        height: clamp(45px, 12vw, 55px) !important;
        border-radius: 50% !important;
        background: var(--primary-neon) !important;
        color: #000 !important;
        box-shadow: 0 0 25px var(--primary-glow) !important;
        border: 2px solid #fff !important;
        font-size: clamp(1.1rem, 4vw, 1.4rem) !important;
    }

    /* When Visible: Small Handle Bar on top of Player */
    .music-player-container:not(.hidden-player) .music-toggle-btn {
        position: relative !important;
        bottom: 5px !important;
        right: 0 !important;
        width: 40px !important;
        height: 20px !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, 0.2) !important;
        color: #fff !important;
        box-shadow: none !important;
        font-size: 0.8rem !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .music-toggle-btn i {
        transform: rotate(90deg) !important;
        transition: transform 0.4s !important;
    }

    .music-player-container.hidden-player .music-toggle-btn i {
        transform: rotate(-90deg) !important;
    }

    /* 7. Music Player Super Responsive Fixes (Inner elements) */
    .player-disc {
        width: 45px !important;
        height: 45px !important;
        flex-shrink: 0 !important;
    }

    .track-info {
        gap: 1px !important;
        min-width: 0 !important;
        flex: 1 !important;
        overflow: hidden !important;
    }

    .track-name {
        font-size: 0.85rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .artist-name {
        font-size: 0.65rem !important;
        opacity: 0.6 !important;
    }

    .player-controls {
        gap: 0.6rem !important;
        flex-shrink: 0 !important;
    }

    .control-btn {
        font-size: 1rem !important;
        padding: 8px !important;
    }

    .play-pause-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.9rem !important;
    }

    .volume-control {
        display: none !important;
    }

    /* 8. Admin Members Super Responsive Fixes */
    .admin-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .admin-tabs {
        overflow-x: auto !important;
        white-space: nowrap !important;
        justify-content: flex-start !important;
        padding: 0.4rem !important;
        gap: 0.4rem !important;
        scrollbar-width: none !important;
    }

    .admin-tabs::-webkit-scrollbar { display: none !important; }

    .tab-btn {
        min-width: 110px !important;
        padding: 0.8rem !important;
        font-size: 0.7rem !important;
        flex: 0 0 auto !important;
    }

    .admin-container {
        padding-left: 0.8rem !important;
        padding-right: 0.8rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .admin-card {
        padding: 1rem !important;
        border-radius: 12px !important;
        width: 100% !important;
        max-width: 100% !important; /* Ensure it doesn't exceed 100% */
        margin-bottom: 1.5rem !important;
        box-sizing: border-box !important;
    }

    .form-group {
        gap: 0.8rem !important;
        display: grid !important;
        grid-template-columns: 1fr !important; /* Always 1 column on mobile/tablet for admin forms */
        width: 100% !important;
    }

    .form-group .action-btn {
        width: 100% !important;
        font-size: 0.9rem !important;
        padding: 0.8rem !important;
        white-space: normal !important; /* Allow text to wrap if button is too small */
        display: block !important;
        margin-top: 0.5rem !important;
    }

    .form-group label,
    .form-group input,
    .form-group select,
    .form-group textarea,
    .form-group .action-btn,
    .form-group .input-wrap {
        grid-column: span 1 !important; /* All fields take full width */
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .input-wrap input {
        width: 100% !important;
        padding-left: 3rem !important; /* Keep space for the icon */
    }

    /* Force all fields to stack on very small screens (phones) */
    @media (max-width: 480px) {
        .admin-container {
            padding: 0.5rem !important;
        }

        .admin-card {
            padding: 0.8rem !important;
        }

        .form-group {
            grid-template-columns: 1fr !important;
            gap: 0.6rem !important;
        }
        
        .form-group input, 
        .form-group select, 
        .form-group textarea,
        .form-group .action-btn,
        .form-group input[id="member-since"],
        .form-group input[id="member-discord-id"],
        .form-group select[id="member-group"] {
            grid-column: span 1 !important;
            width: 100% !important;
        }

        .admin-card h3 {
            font-size: 1rem !important;
            margin-bottom: 0.8rem !important;
        }
    }

    .form-group input, 
    .form-group select, 
    .form-group textarea {
        font-size: 0.85rem !important;
        padding: 0.7rem 0.9rem !important;
        width: 100% !important; /* Ensure full width */
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        color: #fff !important;
    }

    .form-group textarea {
        min-height: 80px !important;
    }

    .member-list-scroll {
        max-height: 500px !important;
        overflow-x: auto !important;
        padding-bottom: 10px !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch !important; /* Smooth scroll on iOS */
    }

    table {
        min-width: 500px !important; /* Slightly smaller min-width for mobile scroll */
        border-collapse: separate !important;
        border-spacing: 0 !important;
        width: 100% !important;
    }

    thead th {
        position: sticky !important;
        top: 0 !important;
        background: #111 !important;
        z-index: 10 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.5) !important;
        font-size: 0.75rem !important;
        padding: 0.6rem !important;
    }

    th, td {
        padding: 0.6rem !important;
        font-size: 0.75rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .delete-btn {
        padding: 5px 10px !important;
        font-size: 0.7rem !important;
    }

    /* Hide Desktop Nav Links on Mobile */
    .nav-links-desktop {
        display: none !important;
    }

/* 6. Navbar Super Responsive Mobile Fixes */
    .intro-content {
        gap: clamp(1rem, 5vh, 3rem) !important;
        width: 100% !important;
        padding: 0 1rem !important;
        transform: scale(clamp(0.7, 5vw, 1)) !important;
    }

    .intro-logo-container {
        width: clamp(100px, 30vw, 160px) !important;
        height: clamp(100px, 30vw, 160px) !important;
    }

    .intro-logo-glow {
        width: 70% !important;
    }

    .logo-ring {
        border-width: 1px !important;
    }

    .logo-ring:nth-child(2) { width: 120% !important; height: 120% !important; }
    .logo-ring:nth-child(3) { width: 140% !important; height: 140% !important; }

    .intro-title-main {
        font-size: clamp(2rem, 12vw, 4rem) !important;
        letter-spacing: clamp(0.3rem, 3vw, 1rem) !important;
        margin-right: -0.5rem !important;
    }

    .intro-subtitle {
        font-size: clamp(0.6rem, 2.5vw, 0.9rem) !important;
        letter-spacing: 3px !important;
    }

    .tap-to-enter {
        transform: scale(0.85) !important;
    }

    .system-status {
        font-size: 0.6rem !important;
        letter-spacing: 2px !important;
    }

    .navbar {
        padding: 0.2rem 0 !important;
        background: rgba(10, 10, 10, 0.8) !important;
        backdrop-filter: blur(25px) !important;
    }

    .nav-container {
        padding: 0.6rem 1rem !important;
    }

    #nav-site-logo {
        height: clamp(30px, 8vw, 40px) !important;
    }

    .nav-brand-name {
        font-size: clamp(0.9rem, 4vw, 1.2rem) !important;
        letter-spacing: 2px !important;
    }

    .nav-actions {
        gap: 0.8rem !important;
    }

    .admin-access-btn {
        width: clamp(35px, 10vw, 42px) !important;
        height: clamp(35px, 10vw, 42px) !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.8rem !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }

    .nav-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px !important;
        width: clamp(35px, 10vw, 42px) !important;
        height: clamp(35px, 10vw, 42px) !important;
        padding: 0 !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border-radius: 10px !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .nav-toggle .bar {
        width: 18px !important;
        height: 2px !important;
        margin: 0 !important;
    }
}

/* 7. Ultra Small Screen Fix (iPhone SE, etc.) */
@media (max-width: 380px) {
    .hero-stats {
        gap: 0.8rem !important;
    }
    
    .stat-item {
        padding: 0.4rem 0.6rem !important;
    }

    .hero-main-title {
        font-size: 1.8rem !important;
    }

    .member-grid {
        grid-template-columns: 1fr !important;
    }
    
    .member-card {
        max-width: 100% !important;
    }

    .overlay-name {
        font-size: 0.95rem !important;
    }

    .nav-brand-name {
        display: none !important;
    }

    .nav-container {
        justify-content: space-between !important;
    }

    .view-profile-btn {
        padding: 0.8rem !important;
        font-size: 0.75rem !important;
    }
}

/* --- END SUPER RESPONSIVE --- */

/* --- UTILITIES & TOGGLES --- */
.setting-row {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Toggle Switch - Modern & Responsive */
.toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    margin: 0.5rem 0;
    width: 100%;
    box-sizing: border-box;
    gap: 1rem;
    flex-wrap: nowrap !important; /* Forces side-by-side even on small screens */
}

.toggle-wrap span {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap; /* Keeps label on one line if possible */
    overflow: hidden;
    text-overflow: ellipsis;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px !important;
    min-width: 46px !important;
    height: 24px !important;
    flex: 0 0 46px !important;
    margin: 0;
    padding: 0;
}

.switch input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    margin: 0 !important;
    padding: 0 !important;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #222;
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100% !important; /* Stays within .switch */
    height: 100% !important;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background-color: #888;
    transition: .4s;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

input:checked + .slider {
    background-color: rgba(0, 210, 255, 0.2);
    border-color: var(--primary-neon);
}

input:checked + .slider:before {
    transform: translateX(22px);
    background-color: var(--primary-neon);
    box-shadow: 0 0 10px var(--primary-glow);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.edit-btn { color: var(--primary-neon); cursor: pointer; background: none; border: none; margin-right: 0.5rem; }
.hidden { display: none !important; }

/* Modal & Category Management */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 95%;
    max-width: 500px;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 { margin: 0; color: var(--primary-neon); }

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.input-row {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    width: 100%;
    align-items: stretch;
    flex-wrap: wrap; /* Stacks inputs on mobile */
}

.input-row input { 
    flex: 1 1 200px; /* Minimum width of 200px before stacking */
    width: auto !important;
    min-width: 0;
}

.input-row .action-btn {
    width: auto !important;
    min-width: 100px;
    flex: 1 1 100px;
    flex-shrink: 0;
    margin: 0;
}

.category-list {
    margin-top: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 210, 255, 0.3);
}

.category-item span { 
    color: #fff; 
    font-weight: 500;
    font-size: 0.95rem;
}

.category-item .delete-btn {
    color: #ff4444;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
}

.category-management {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.category-management label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Advanced Intro Screen Redesign */
.intro-screen {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

.intro-bg-animation {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.grid-background {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 210, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 210, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    transform: perspective(500px) rotateX(60deg) translateY(-100px);
    transform-origin: top;
    animation: gridScroll 10s linear infinite;
    mask-image: linear-gradient(to bottom, transparent, black);
}

@keyframes gridScroll {
    0% { background-position: center 0; }
    100% { background-position: center 50px; }
}

.scanline {
    position: absolute;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(0, 210, 255, 0.1), transparent);
    top: -100px;
    animation: scanline 4s linear infinite;
    z-index: 2;
}

@keyframes scanline {
    0% { top: -100px; }
    100% { top: 100%; }
}

.intro-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    text-align: center;
}

.intro-logo-container {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-logo-glow {
    width: 120px;
    z-index: 5;
    filter: drop-shadow(0 0 20px var(--primary-glow));
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

.logo-ring {
    position: absolute;
    border: 2px solid var(--primary-neon);
    border-radius: 50%;
    opacity: 0.3;
    animation: ringSpin 10s linear infinite;
}

.logo-ring:nth-child(2) {
    width: 160px;
    height: 160px;
    border-style: dashed;
    animation-duration: 15s;
}

.logo-ring:nth-child(3) {
    width: 190px;
    height: 190px;
    border-width: 1px;
    opacity: 0.1;
    animation-direction: reverse;
    animation-duration: 20s;
}

@keyframes ringSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.intro-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.intro-title-main {
    font-family: var(--cyber-font);
    font-weight: 900;
    font-size: 5rem;
    letter-spacing: 1.5rem;
    color: #fff;
    position: relative;
    text-shadow: 0 0 20px var(--primary-glow);
    margin-right: -1.5rem; /* Compensate for letter spacing */
}

.intro-title-main::before,
.intro-title-main::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.intro-title-main::before {
    color: #ff00ff;
    z-index: -1;
    animation: glitch 3s infinite;
}

.intro-title-main::after {
    color: #00ffff;
    z-index: -2;
    animation: glitch 2s infinite reverse;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.intro-subtitle {
    font-family: var(--cyber-font);
    font-size: 0.9rem;
    letter-spacing: 0.5rem;
    color: var(--primary-neon);
    opacity: 0.7;
    font-weight: 600;
}

.intro-action-wrap {
    margin-top: 2rem;
}

.tap-to-enter {
    position: relative;
    padding: 1.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tap-text {
    font-family: var(--cyber-font);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.3rem;
    color: #fff;
    z-index: 2;
    animation: pulseText 2s infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.95); }
}

.tap-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tap-rings span {
    position: absolute;
    border: 1px solid var(--primary-neon);
    border-radius: 50px;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: tapRing 3s infinite;
}

.tap-rings span:nth-child(2) { animation-delay: 1s; }
.tap-rings span:nth-child(3) { animation-delay: 2s; }

@keyframes tapRing {
    0% { transform: scale(0.8); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

.intro-footer {
    position: absolute;
    bottom: 3rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

.footer-line {
    width: 50px;
    height: 2px;
    background: var(--primary-neon);
    box-shadow: 0 0 10px var(--primary-neon);
}

.system-status {
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--primary-neon);
    opacity: 0.5;
    letter-spacing: 2px;
}

/* Existing noise animation updated */
.intro-noise {
    position: absolute;
    inset: 0;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.05;
    pointer-events: none;
    z-index: 15;
}

/* Table styling for admin */
table { width: 100%; margin-top: 2rem; border-collapse: collapse; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
th { color: var(--primary-neon); }
.delete-btn { color: #ff4444; cursor: pointer; background: none; border: none; }

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .kushman-bg { font-size: 8rem; }
    .main-glow { max-width: 350px; }
    .admin-grid { grid-template-columns: 1fr; }
    .music-player { width: 400px; }
}

@media (max-width: 768px) {
    .navbar { padding: 1rem; }
    
    .intro-title-main {
        font-size: 3rem;
        letter-spacing: 0.8rem;
        margin-right: -0.8rem;
    }

    .intro-subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.3rem;
    }

    .intro-logo-container {
        width: 120px;
        height: 120px;
    }

    .intro-logo-glow {
        width: 90px;
    }

    .logo-ring:nth-child(2) { width: 130px; height: 130px; }
    .logo-ring:nth-child(3) { width: 150px; height: 150px; }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-btn {
        font-size: 1.8rem;
        width: 80%;
        text-align: center;
    }

    .kushman-bg { font-size: 5rem; letter-spacing: 1rem; }
    .main-glow { max-width: 250px; }
    
    .bottom-widgets {
        flex-direction: column-reverse;
        align-items: center;
        gap: 1.5rem;
        bottom: 1rem;
        padding: 0 1rem;
    }

    .clock-widget { text-align: center; }
    
    .music-player { 
        width: 95vw; 
        gap: 0.8rem;
        padding: 0.8rem;
        border-radius: 16px;
    }

    .player-disc { width: 60px; height: 60px; }
    .track-name { font-size: 0.85rem; }
    .volume-control { display: none; } /* Hide volume on mobile to save space */

    .member-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .member-card {
        min-height: 280px;
        padding: 1.5rem 1rem 1rem;
    }

    .avatar-container { width: 80px; height: 80px; }
    .member-name { font-size: 1.1rem; }

    .member-hover-detail {
        width: 90vw;
        position: fixed;
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%) translateY(120%);
    }

    .member-card:active .member-hover-detail {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    .admin-tabs {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .tab-btn {
        min-width: 120px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .kushman-bg { font-size: 3rem; letter-spacing: 0.5rem; }
    .main-glow { max-width: 180px; }
    .tagline { font-size: 0.7rem; letter-spacing: 0.2rem; }
    
    .group-title { font-size: 1.1rem; }
    
    .admin-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
}
