/*
  Sections (selector, description, line in this file):
    Line 16: :root - CSS variables
    Line 39: body - page background and typography
    Line 65: .header - top header bar
    Line 114: .main-content - main content area
    Line 122: .container - content container
    Line 129: .form-container - login/register form
    Line 199: .btn - buttons
    Line 238: .btn-discord-login - Discord login button
*/

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


:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-tertiary: #111827;
    --accent-primary: #3b82f6;
    --accent-secondary: #06b6d4;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.1);
    --success: #10b981;
    --warning: #3b82f6;
    --danger: #ef4444;
    
    --primary-color: #3b82f6;
    --secondary-color: #06b6d4;
    --bg-dark: #0a0e1a;
    --bg-darker: #111827;
}

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 50%, var(--bg-dark) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(56, 139, 253, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}


.header {
    background: transparent;
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.company-name {
    color: #ffffff;
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
    margin-left: 15px;
    transition: all 0.3s ease;
}

.company-name:hover {
    color: #ffffff;
    text-decoration: none;
}


.main-content {
    padding: 20px;
    min-height: calc(100vh - 100px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

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


.form-container {
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    color: var(--text-primary);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    border: 1px solid var(--border-color);
    max-width: 500px;
    width: 100%;
}

.form-container h1 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 32px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
}


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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-text {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-text:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
}


.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    width: 100%;
    box-shadow: 0 4px 12px rgba(56, 139, 253, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 16px rgba(56, 139, 253, 0.35);
    transform: translateY(-2px);
}

.btn-signup {
    display: block;
    background: rgba(56, 139, 253, 0.12);
    color: var(--primary-color);
    border: 1px solid rgba(56, 139, 253, 0.3);
    margin-top: 15px;
    width: 100%;
}

.btn-signup:hover {
    background: rgba(56, 139, 253, 0.2);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-discord-login {
    background: linear-gradient(135deg, #5865f2 0%, #7289da 100%);
    border: none;
    border-radius: 10px;
    padding: 14px 24px;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    text-align: center;
}

.btn-discord-login i {
    font-size: 18px;
}

.btn-discord-login:hover {
    background: linear-gradient(135deg, #7289da 0%, #5865f2 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
    color: #ffffff;
}

.btn-discord-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.25);
}

.divider-section {
    display: flex;
    align-items: center;
    margin: 25px 0;
    gap: 15px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider-text {
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.welcome-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.welcome-text {
    text-align: center;
    margin-bottom: 20px;
}

.welcome-text h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.welcome-text p {
    color: var(--text-secondary);
    font-size: 14px;
}

.welcome-text .highlight {
    color: var(--primary-color);
    font-weight: 600;
}


.download-section {
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    margin-bottom: 30px;
}

.download-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.download-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-button:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    color: #fff;
}

.download-button .download-icon {
    width: 20px;
    height: 20px;
}


body.preloading {
    overflow: hidden;
}

#preloader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-darker) 60%, var(--bg-dark));
    display: grid;
    place-items: center;
    z-index: 9999;
    transition: opacity 0.35s ease;
}

#preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.preloader-inner {
    text-align: center;
    padding: 30px;
}

.preloader-inner .preloader-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.preloader-progress {
    width: 200px;
    height: 6px;
    background: rgba(48, 54, 61, 0.4);
    border-radius: 9999px;
    overflow: hidden;
    margin: 0 auto 15px;
}

.preloader-bar {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 9999px;
    animation: preloader-move 1.25s ease-in-out infinite;
}

@keyframes preloader-move {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(150%); }
    100% { transform: translateX(400%); }
}

.preloader-text {
    color: var(--text-secondary);
    font-size: 14px;
}


.hidden {
    display: none !important;
}


@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
    }

    .logo-img {
        width: 45px;
        height: 45px;
    }

    .company-name {
        font-size: 20px;
        margin-left: 10px;
    }

    .form-container {
        padding: 25px 20px;
        margin: 10px;
    }

    .form-container h1 {
        font-size: 26px;
    }
}


.navigation-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(56, 139, 253, 0.25);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: fit-content;
}

.navigation-button:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 16px rgba(56, 139, 253, 0.35);
    transform: translateY(-2px);
}


.sidebar-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 20px 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-nav.collapsed {
    transform: translateX(-100%);
}

.sidebar-nav .navbar-brand {
    display: block;
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.95);
}

.navbar-nav {
    flex-direction: column;
    width: 100%;
    padding: 80px 0 0 0;
    list-style: none;
    margin: 0;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.navbar-nav .nav-item {
    width: 100%;
    margin-bottom: 5px;
}

.navbar-nav .nav-link {
    color: var(--text-secondary);
    padding: 15px 25px;
    display: block;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 8px;
    background: transparent;
    border: none;
    margin: 2px 10px;
    font-weight: 500;
    font-size: 15px;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(56, 139, 253, 0.12);
    transform: translateX(4px);
}

.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, rgba(56, 139, 253, 0.15), rgba(139, 92, 246, 0.12));
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    font-weight: 600;
}


.sidebar-toggle {
    position: fixed;
    top: 50%;
    left: 250px;
    transform: translateY(-50%);
    background: rgba(56, 139, 253, 0.85);
    color: #fff;
    border: none;
    width: 40px;
    height: 60px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle:hover {
    background: rgba(56, 139, 253, 1);
    box-shadow: 2px 0 12px rgba(56, 139, 253, 0.3);
}

.sidebar-toggle.collapsed {
    left: 0;
}


.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 15px;
    color: white;
    box-shadow: 0 4px 12px rgba(56, 139, 253, 0.3);
    transition: all 0.2s ease;
    font-size: 18px;
}

.mobile-menu-toggle:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: scale(1.05);
}


.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.show {
    display: block;
    opacity: 1;
}


.main-content.collapsed {
    margin-left: 0;
}


.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(22, 27, 34, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(88, 166, 255, 0.4);
}

.stat-icon {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}


@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .sidebar-nav,
    .sidebar-nav.collapsed {
        transform: translateX(-260px) !important;
        transition: transform 0.3s ease !important;
    }

    .sidebar-nav.show,
    .sidebar-nav.collapsed.show {
        transform: translateX(0) !important;
        z-index: 1001 !important;
    }
    
    .mobile-overlay {
        z-index: 1000 !important;
    }
    
    .mobile-overlay.show {
        display: block !important;
        opacity: 1 !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .main-content.collapsed {
        margin-left: 0 !important;
    }

    .sidebar-nav {
        transform: translateX(-250px);
    }

    .sidebar-nav.show {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: none;
    }

    .main-content {
        margin-left: 0 !important;
    }
}


#app-preloader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-darker) 60%, var(--bg-dark));
    display: grid;
    place-items: center;
    z-index: 9999;
}

#app-preloader.hide {
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

#app-preloader .preloader-box {
    width: min(520px, 92vw);
    padding: 28px 24px;
    border-radius: 16px;
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    color: var(--text-primary);
    text-align: center;
}

#app-preloader .preloader-logo {
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: clamp(20px, 3.4vw, 26px);
    margin-bottom: 14px;
}

#app-preloader .preloader-bar {
    position: relative;
    height: 8px;
    border-radius: 9999px;
    overflow: hidden;
    background: rgba(48, 54, 61, 0.4);
    border: 1px solid rgba(48, 54, 61, 0.5);
}

#app-preloader .preloader-fill {
    position: absolute;
    inset: 0 100% 0 0;
    display: block;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    animation: preloader-sweep 1.25s ease-in-out infinite;
}

@keyframes preloader-sweep {
    0% { left: 0; right: 70%; }
    50% { left: 20%; right: 20%; }
    100% { left: 85%; right: 0; }
}

#app-preloader .preloader-tip {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.9;
}
