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

/* ============================================
   ROOT VARIABLES & RESETS
   ============================================ */

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

:root {
    --primary: #a855f7;
    --primary-dark: #7e22ce;
    --secondary: #c084fc;
    --staff-red: #ef4444;
    --staff-red-hover: #dc2626;
    --bg-main: #0a0a0f;
    --bg-secondary: #14141f;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --card-bg: rgba(20, 20, 31, 0.95);
    --border: rgba(168, 85, 247, 0.3);
    --shadow: rgba(168, 85, 247, 0.2);
    --gradient-1: #a855f7;
    --gradient-2: #c084fc;
}

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

/* ============================================
   BACKGROUND & VISUAL EFFECTS 345 10 8
   ============================================ */

.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
}

    .hero-background .bg-layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        filter: blur(3px) brightness(0.9);
        transform: scale(1.05);
        transition: opacity 2s ease-in-out;
    }

    .hero-background::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient( 180deg, rgba(10, 10, 15, 0.3) 0%, rgba(10, 10, 15, 0.6) 50%, var(--bg-main) 100% );
        z-index: 1;
        pointer-events: none;
    }

/* Floating Particles */
.particle-container {
    position: fixed;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: float-particle 15s infinite linear;
    opacity: 0;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* Background Override Utility */
.no-background {
    background: transparent !important;
}

    .no-background::before {
        display: none !important;
    }

/* ============================================
   NAVIGATION
   ============================================ */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 40px;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 10px;
    position: relative;
}

    .logo::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 10px;
        padding: 1px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .logo:hover::before {
        opacity: 1;
    }

    .logo:hover {
        transform: translateY(-2px);
    }

.logo-icon {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.4));
    transition: all 0.3s ease;
    image-rendering: crisp-edges;
}

.logo:hover .logo-icon {
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.7));
    transform: rotate(-5deg) scale(1.05);
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.8px;
    display: flex;
    align-items: center;
}

.logo-quartz {
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

    .logo-quartz::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, var(--primary), transparent);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

.logo:hover .logo-quartz::after {
    opacity: 1;
}

.logo-craft {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

    .nav-links a {
        color: white;
        text-decoration: none;
        font-weight: 500;
        font-size: 15px;
        transition: all 0.2s;
        position: relative;
    }

        .nav-links a:hover {
            color: var(--primary);
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--primary);
            transition: width 0.3s;
        }

        .nav-links a:hover::after {
            width: 100%;
        }

        /* Staff Links */
        .nav-links a.staff-link {
            color: var(--staff-red);
            font-weight: 600;
        }

            .nav-links a.staff-link:hover {
                color: var(--staff-red-hover);
            }

            .nav-links a.staff-link::after {
                background: var(--staff-red);
            }

/* Nav Dropdown Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

    .nav-dropdown > a {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 16px;
        color: var(--text-primary);
        text-decoration: none;
        font-weight: 600;
        font-size: 15px;
        transition: all 0.2s;
        border-radius: 8px;
    }

        .nav-dropdown > a:hover {
            background: rgba(168, 85, 247, 0.1);
        }

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
    padding: 8px;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

    .nav-dropdown-menu a:hover {
        background: rgba(168, 85, 247, 0.1);
        color: var(--primary);
    }

    .nav-dropdown-menu a svg {
        flex-shrink: 0;
    }

/* User Menu */
.user-menu {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

    .user-toggle:hover {
        background: rgba(168, 85, 247, 0.15);
        border-color: var(--primary);
    }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    image-rendering: pixelated;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.user-arrow {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.user-menu:hover .user-arrow,
.user-menu.active .user-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
    padding: 8px;
}

.user-menu:hover .user-dropdown,
.user-menu.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    text-decoration: none;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

    .user-dropdown a:hover,
    .user-dropdown button:hover {
        background: rgba(168, 85, 247, 0.1);
        color: var(--primary);
    }

.user-dropdown form {
    margin: 0;
}

.user-dropdown a svg,
.user-dropdown button svg {
    flex-shrink: 0;
}

/* Staff Link Highlight */
.staff-link {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

    .staff-link:hover {
        background: rgba(168, 85, 247, 0.2);
    }

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 12px;
}

.btn-login,
.btn-register {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-login {
    background: transparent;
    color: white;
    border: 1px solid var(--border);
}

    .btn-login:hover {
        background: rgba(168, 85, 247, 0.1);
    }

.btn-register {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
}

    .btn-register:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px var(--shadow);
        color: white !important;
    }

/* ============================================
   MAIN CONTENT & LAYOUT
   ============================================ */

main {
    flex: 1;
    position: relative;
    z-index: 2;
}

.page-container {
    position: relative;
    z-index: 5;
    background: rgba(10, 10, 15, 0.95);
    min-height: calc(100vh - 160px);
    padding: 120px 40px 80px;
}

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

    .content-card h1,
    .content-card h2,
    .content-card h3 {
        color: var(--text-primary);
    }

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: var(--bg-secondary);
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 5;
    margin-top: auto;
}

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

/* ============================================
   FORMS
   ============================================ */

.form-control,
.form-select {
    background: rgba(20, 20, 31, 0.8);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

    .form-control:focus,
    .form-select:focus {
        background: rgba(20, 20, 31, 0.95);
        border-color: var(--primary);
        box-shadow: 0 0 0 0.25rem rgba(168, 85, 247, 0.25);
        color: var(--text-primary);
        outline: none;
    }

    .form-control::placeholder {
        color: var(--text-secondary);
    }

    .form-control:disabled,
    .form-control[readonly] {
        background-color: rgba(20, 20, 31, 0.6);
        border-color: rgba(168, 85, 247, 0.2);
        color: var(--text-secondary);
        opacity: 0.8;
    }

.form-floating > .form-control:disabled ~ label,
.form-floating > .form-control[readonly] ~ label {
    color: var(--text-secondary);
    opacity: 0.7;
}

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

.form-floating > label {
    color: var(--text-secondary);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary);
}

.form-check-input {
    background-color: rgba(20, 20, 31, 0.8);
    border-color: var(--border);
}

    .form-check-input:checked {
        background-color: var(--primary);
        border-color: var(--primary);
    }

    .form-check-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 0.25rem rgba(168, 85, 247, 0.25);
    }

.form-check-label {
    color: var(--text-primary);
}

/* ============================================
   BUTTONS
   ============================================ */

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

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border: none;
    color: white;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px var(--shadow);
        color: white;
    }

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.15);
        color: var(--text-primary);
    }

.btn-danger {
    background: var(--staff-red);
    border: none;
    color: white;
}

    .btn-danger:hover {
        background: var(--staff-red-hover);
        color: white;
    }

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

    .btn-success:hover {
        background: rgba(16, 185, 129, 0.25);
        color: #10b981;
    }

/* ============================================
   TABLES
   ============================================ */

.table {
    color: var(--text-primary);
    width: 100%;
}

.table-responsive {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
}

.table thead th {
    background: rgba(168, 85, 247, 0.1);
    border-color: var(--border);
    color: var(--text-primary);
    font-weight: 600;
}

.table tbody tr {
    border-color: var(--border);
}

    .table tbody tr:hover {
        background: rgba(168, 85, 247, 0.05);
    }

.table-danger {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.badge-secondary {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.alert-info {
    background: rgba(168, 85, 247, 0.1);
    border-color: var(--border);
    color: var(--primary);
}

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 24px;
}

.card-header {
    background: rgba(168, 85, 247, 0.1);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */

.dropdown-menu {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.dropdown-item {
    color: var(--text-primary);
}

    .dropdown-item:hover {
        background: rgba(168, 85, 247, 0.2);
        color: var(--text-primary);
    }

/* ============================================
   MODALS
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

    .modal.active {
        display: flex;
    }

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
}

    .modal-header h3 {
        font-size: 20px;
        font-weight: 700;
        color: var(--text-primary);
        margin: 0;
    }

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .modal-close:hover {
        color: var(--text-primary);
    }

.modal-body {
    padding: 28px;
}

    .modal-body p {
        color: var(--text-primary);
        margin-bottom: 16px;
        line-height: 1.6;
    }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid var(--border);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-muted {
    color: var(--text-secondary) !important;
}

.text-danger {
    color: #ef4444 !important;
}

.text-success {
    color: #10b981 !important;
}

.text-primary {
    color: var(--primary) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    nav {
        padding: 16px 20px;
    }

    .nav-links {
        display: none;
    }

    .page-container {
        padding: 100px 20px 60px;
    }

    .content-card {
        padding: 20px;
    }

    .logo-text {
        font-size: 18px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }
}
