/* Hide protected nav links by default; JS shows them when authenticated */
.nav-link[data-auth="protected"] { display: none; }

/* Profile dropdown */
.user-profile { position: relative; cursor: pointer; }
.user-profile .profile-info { cursor: pointer; }
.user-profile .profile-caret { margin-left: 8px; transition: transform .2s ease; }
.user-profile.open .profile-caret { transform: rotate(180deg); }
.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    min-width: 200px;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-primary);
    backdrop-filter: blur(10px);
    display: none;
    z-index: 5000;
}
.user-profile.open .profile-dropdown { display: block; }
.profile-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.profile-dropdown .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}
.profile-dropdown .dropdown-item i {
    color: var(--primary-color);
    width: 16px;
}
.profile-dropdown .dropdown-separator { height: 1px; background: var(--border-color); margin: 6px 0; }
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00ffff;
    --secondary-color: #ff00ff;
    --accent-color: #00ff88;
    --bg-primary: #0a0a0f;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --text-muted: #888888;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-primary: 0 8px 32px rgba(0, 255, 255, 0.1);
    --shadow-secondary: 0 8px 32px rgba(255, 0, 255, 0.1);
    --font-primary: 'Orbitron', monospace;
    --font-secondary: 'Inter', sans-serif;
}

body {
    font-family: var(--font-secondary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary); /* use neutral text color, not blue */
    text-decoration: none;
}

.nav-brand i {
    font-size: 1.8rem;
    color: var(--text-primary);
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Page System */
.page {
    display: none;
    min-height: 100vh;
    padding-top: 80px;
}

.page.active {
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-primary);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.glitch-text {
    color: var(--primary-color);
    position: relative;
    animation: glitch 2s infinite;
}

.accent-text {
    color: var(--secondary-color);
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-mascot {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Cat Mascot */
.cat-mascot {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 1rem;
}

.cat-mascot.small {
    width: 120px;
    height: 120px;
    margin-bottom: 0.5rem;
}

.cat-body {
    position: relative;
    width: 100%;
    height: 100%;
}

.cat-face {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4a5568, #2d3748);
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.cat-mascot.small .cat-face {
    width: 50px;
    height: 50px;
}

.cat-eyes {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.cat-mascot.small .cat-eyes {
    gap: 10px;
}

.eye {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: blink 3s infinite;
    box-shadow: 0 0 10px var(--accent-color);
}

.cat-mascot.small .eye {
    width: 5px;
    height: 5px;
}

.cat-nose {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 50%;
}

.cat-mouth {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
}

.mouth-left,
.mouth-right {
    width: 8px;
    height: 4px;
    border: 1px solid var(--text-secondary);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.cat-ears {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
}

.cat-mascot.small .cat-ears {
    gap: 25px;
}

.ear {
    width: 20px;
    height: 25px;
    background: linear-gradient(135deg, #4a5568, #2d3748);
    border: 2px solid var(--primary-color);
    border-radius: 50% 50% 0 0;
    transform: rotate(-15deg);
}

.ear.ear-right {
    transform: rotate(15deg);
}

.cat-mascot.small .ear {
    width: 12px;
    height: 15px;
}

.cat-hoodie {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 60px;
    background: linear-gradient(135deg, #1a202c, #2d3748);
    border: 2px solid var(--primary-color);
    border-radius: 20px 20px 40px 40px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.cat-mascot.small .cat-hoodie {
    width: 60px;
    height: 40px;
}

.cat-laptop {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 40px;
}

.laptop-screen {
    width: 100%;
    height: 60%;
    background: linear-gradient(135deg, #1a202c, #2d3748);
    border: 2px solid var(--primary-color);
    border-radius: 4px 4px 0 0;
    position: relative;
}

.laptop-screen::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    background: var(--accent-color);
    opacity: 0.3;
    border-radius: 2px;
    animation: screenGlow 2s infinite alternate;
}

.laptop-keyboard {
    width: 100%;
    height: 40%;
    background: #2d3748;
    border: 2px solid var(--primary-color);
    border-radius: 0 0 4px 4px;
}

/* Speech Bubble */
.speech-bubble {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0.75rem 1rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-primary);
    max-width: 200px;
    text-align: center;
    font-size: 0.9rem;
    animation: float 3s ease-in-out infinite;
}

.speech-bubble.small {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    max-width: 150px;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--glass-bg);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-primary);
}

.stat-number {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Features Section */
.features {
    padding: 6rem 0;
}

.section-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-primary);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--bg-primary);
    box-shadow: var(--shadow-primary);
}

.feature-card h3 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05), rgba(255, 0, 255, 0.05));
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-mascot {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-content h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Page Headers */
.page-header,
.profile-header,
.dashboard-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.header-content,
.profile-welcome,
.dashboard-welcome {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.header-text h1,
.profile-title h1,
.welcome-text h1 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.header-text p,
.profile-title p,
.welcome-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Filters */
.filters {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--bg-primary);
    border-color: var(--primary-color);
}

/* Competitions Grid */
.competitions-grid {
    padding: 3rem 0;
}

.competitions-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.competition-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.competition-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-primary);
}

.competition-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.competition-status {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.status-badge,
.difficulty-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.upcoming {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.status-badge.open {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

.status-badge.ended {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid #6c757d;
}

.difficulty-badge.beginner {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

.difficulty-badge.intermediate {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.difficulty-badge.advanced {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid #dc3545;
}

.prize-pool {
    text-align: right;
}

.prize-amount {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.prize-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.competition-title {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.competition-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.competition-categories {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.category-tag {
    padding: 0.25rem 0.5rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--primary-color);
}

.competition-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.detail-item i {
    color: var(--primary-color);
    width: 16px;
}

.participants-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.competition-actions {
    display: flex;
    gap: 0.5rem;
}

/* Dashboard */
.dashboard-stats {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--bg-primary);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dashboard-content {
    padding: 3rem 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

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

.section-header h2 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    color: var(--text-primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 1.2rem;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.profile-rank {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.sidebar-section h3 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quick-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.quick-stat:last-child {
    border-bottom: none;
}

.quick-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.quick-stat-value {
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.quick-stat-value i {
    color: var(--accent-color);
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    font-size: 0.95rem;
    font-weight: 500;
}

.tab-btn:hover,
.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
}

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

.profile-form-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.profile-avatar-section {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--bg-primary);
}

.profile-basic-info h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.profile-basic-info p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-basic-info i {
    color: var(--primary-color);
    width: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.1);
}

.form-group input:disabled,
.form-group textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    align-self: flex-end;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Security Section */
.security-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.security-section h2 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.security-section p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.security-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 400px;
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Statistics Section */
.statistics-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.statistics-section h2 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.statistics-section p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stats-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary);
}

.stats-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--bg-primary);
}

.stats-content {
    flex: 1;
}

.stats-number {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stats-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Auth Section */
.auth-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.auth-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.auth-mascot {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-primary);
}

.auth-form h1 {
    font-family: var(--font-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: center;
}

.auth-form > p {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

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

.checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bg-primary);
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--secondary-color);
}

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    background: #dc3545;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 25%;
}

.strength-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--secondary-color);
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.1;
    animation: float-random 20s infinite linear;
}

.floating-icon:nth-child(1) { left: 10%; animation-delay: 0s; }
.floating-icon:nth-child(2) { left: 20%; animation-delay: -2s; }
.floating-icon:nth-child(3) { left: 30%; animation-delay: -4s; }
.floating-icon:nth-child(4) { left: 40%; animation-delay: -6s; }
.floating-icon:nth-child(5) { left: 50%; animation-delay: -8s; }
.floating-icon:nth-child(6) { left: 60%; animation-delay: -10s; }
.floating-icon:nth-child(7) { left: 70%; animation-delay: -12s; }
.floating-icon:nth-child(8) { left: 80%; animation-delay: -14s; }

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2; /* supaya selalu di belakang konten */
    background: rgb(0, 0, 0); /* fallback warna hitam */
    pointer-events: none; /* biar tidak ganggu klik */
}


/* Animations */
@keyframes glitch {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
}

@keyframes blink {
    0%, 90%, 100% { opacity: 1; }
    95% { opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-random {
    0% { transform: translateY(100vh) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

@keyframes screenGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 0;
        transition: left 0.3s ease;
    }

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

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .auth-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }

    .filter-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .competitions-list {
        grid-template-columns: 1fr;
    }

    .profile-avatar-section {
        flex-direction: column;
        text-align: center;
    }

    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .header-content,
    .profile-welcome,
    .dashboard-welcome {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .auth-form {
        padding: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .profile-tabs {
        flex-wrap: wrap;
    }
}

