@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Orbitron:wght@400;600;800;900&display=swap');

:root {
    --bg-primary: #080614;
    --bg-secondary: #100d28;
    --bg-card: rgba(22, 19, 56, 0.45);
    --bg-sidebar: #0b091e;
    --border-color: rgba(62, 54, 120, 0.3);
    --border-glow-cyan: rgba(0, 240, 255, 0.2);
    --border-glow-pink: rgba(255, 0, 127, 0.2);
    --accent-cyan: #00f0ff;
    --accent-pink: #ff007f;
    --accent-green: #39ff14;
    --accent-yellow: #ffd700;
    --text-main: #ffffff;
    --text-muted: #8b89a6;
    --transition-speed: 0.3s;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-text, .gaming-font {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #1f1b40;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* Layout Wrapper */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-speed);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-brand {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-brand span {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-pink);
    text-shadow: 0 0 8px rgba(255, 0, 127, 0.5);
    margin-top: 4px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 14px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-item {
    margin-bottom: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-speed) ease;
}

.sidebar-link i {
    margin-right: 12px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-link:hover {
    color: var(--accent-cyan);
    background-color: rgba(0, 240, 255, 0.05);
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.1);
}

.sidebar-item.active .sidebar-link {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(255, 0, 127, 0.15) 0%, rgba(0, 240, 255, 0.05) 100%);
    border-left: 3px solid var(--accent-pink);
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.1);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.user-profile-info {
    overflow: hidden;
}

.user-profile-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.user-profile-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Navbar */
.top-navbar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(8, 6, 20, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.navbar-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-logout {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-speed);
}

.btn-logout:hover {
    color: var(--accent-pink);
    text-shadow: 0 0 8px rgba(255, 0, 127, 0.5);
}

/* Page Container */
.page-container {
    padding: 30px;
    flex-grow: 1;
}

/* Glassmorphism Card */
.g-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.g-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-pink) 0%, var(--accent-cyan) 100%);
    opacity: 0.7;
}

.g-card.no-glow::before {
    display: none;
}

.g-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* Grid System */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

/* Stat Card */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-speed);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--border-glow-cyan);
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.cyan {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.stat-icon.pink {
    background: rgba(255, 0, 127, 0.1);
    color: var(--accent-pink);
    border: 1px solid rgba(255, 0, 127, 0.2);
}

.stat-icon.green {
    background: rgba(57, 255, 20, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.stat-icon.yellow {
    background: rgba(255, 215, 0, 0.1);
    color: var(--accent-yellow);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    background-color: rgba(16, 13, 40, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    transition: var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--border-glow-cyan);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

select.form-control option {
    background-color: var(--bg-secondary);
    color: #fff;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-speed);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-pink) 0%, #a200ff 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 0, 127, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(255, 0, 127, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #0072ff 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
    transform: translateY(-2px);
}

.btn-dark {
    background: rgba(30, 26, 64, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-dark:hover {
    background: rgba(30, 26, 64, 1);
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 11px;
    border-radius: 6px;
}

/* Custom Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.g-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    color: #fff;
}

.g-table th {
    background-color: rgba(16, 13, 40, 0.7);
    border-bottom: 2px solid var(--border-color);
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-align: left;
}

.g-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.g-table tbody tr {
    transition: var(--transition-speed);
}

.g-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.badge-pembina {
    background: rgba(255, 0, 127, 0.15);
    color: var(--accent-pink);
    border: 1px solid rgba(255, 0, 127, 0.3);
}

.badge-kapten {
    background: rgba(255, 215, 0, 0.15);
    color: var(--accent-yellow);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.badge-anggota {
    background: rgba(0, 240, 255, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.badge-success {
    background: rgba(57, 255, 20, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(57, 255, 20, 0.3);
}

.badge-danger {
    background: rgba(255, 0, 0, 0.15);
    color: #ff3333;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

/* Score display */
.score-badge {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

.score-win {
    color: var(--accent-green);
    text-shadow: 0 0 5px rgba(57, 255, 20, 0.4);
}

.score-loss {
    color: #ff3333;
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.4);
}

/* Auth Pages Styling */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1b163a 0%, #080614 70%);
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: rgba(16, 13, 40, 0.75);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5), 0 0 15px var(--border-glow-pink);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-cyan));
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px var(--accent-cyan);
}

.auth-logo p {
    font-size: 12px;
    color: var(--accent-pink);
    margin-top: 5px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alert Notification */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background-color: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: var(--accent-green);
}

.alert-danger {
    background-color: rgba(255, 51, 51, 0.1);
    border: 1px solid rgba(255, 51, 51, 0.3);
    color: #ff3333;
}

/* Radar Chart container */
.chart-container {
    position: relative;
    margin: auto;
    height: 300px;
    width: 100%;
    max-width: 350px;
}

/* Responsive Grid/Flex tweaks */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
}
