/* BATULOG V3 - SOKAK STYLE CSS */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* ROOT VARIABLES */
:root {
    --primary-orange: #ff6b35;
    --primary-red: #dc2626;
    --primary-gold: #fbbf24;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --card-bg: #1a1a1a;
    --card-hover: #252525;
    --border-color: #333;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    /* Gradients */
    --gradient-fire: linear-gradient(135deg, #ff6b35 0%, #dc2626 50%, #fbbf24 100%);
    --gradient-dark: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    --gradient-neon: linear-gradient(135deg, #ff006e, #8338ec, #3a86ff);
    /* Shadows */
    --shadow-glow: 0 0 30px rgba(255, 107, 53, 0.5);
    --shadow-neon: 0 0 50px rgba(255, 107, 53, 0.8);
    --shadow-fire: 0 10px 40px rgba(220, 38, 38, 0.6);
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 80px;
    --container-max: 1920px;
}

/* FONTS */
.font-bebas {
    font-family: 'Bebas Neue', cursive;
}

.font-oswald {
    font-family: 'Oswald', sans-serif;
}

.font-barlow {
    font-family: 'Barlow', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Barlow', sans-serif;
    background: var(--darker-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-fire);
    border-radius: 5px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--primary-orange);
    }

/* PRELOADER */
#preloader {
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
}

.motorcycle-loader {
    position: relative;
    width: 200px;
    height: 100px;
    margin: 0 auto;
}

.motorcycle-icon {
    animation: motorcycleMove 2s ease-in-out infinite;
}

.road-line {
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 2px;
    background: repeating-linear-gradient( 90deg, transparent, transparent 10px, var(--primary-orange) 10px, var(--primary-orange) 20px );
    animation: roadMove 1s linear infinite;
}

@keyframes motorcycleMove {
    0%, 100% {
        transform: translateX(0) rotateZ(0);
    }

    25% {
        transform: translateX(5px) rotateZ(-2deg);
    }

    75% {
        transform: translateX(-5px) rotateZ(2deg);
    }
}

@keyframes roadMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-20px);
    }
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 107, 53, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: var(--gradient-fire);
    animation: loadingProgress 2s ease-out forwards;
}

@keyframes loadingProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* GLITCH EFFECT */
.glitch-text {
    position: relative;
    color: var(--primary-orange);
    text-transform: uppercase;
    letter-spacing: 3px;
}

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

    .glitch-text::before {
        animation: glitch-1 0.5s infinite;
        color: #00ffff;
        z-index: -1;
    }

    .glitch-text::after {
        animation: glitch-2 0.5s infinite;
        color: #ff00ff;
        z-index: -2;
    }

@keyframes glitch-1 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }

    20% {
        clip-path: inset(20% 0 60% 0);
        transform: translate(-2px, 2px);
    }

    40% {
        clip-path: inset(50% 0 20% 0);
        transform: translate(2px, -2px);
    }

    60% {
        clip-path: inset(10% 0 80% 0);
        transform: translate(-2px, 1px);
    }

    80% {
        clip-path: inset(80% 0 10% 0);
        transform: translate(1px, -1px);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0);
    }

    20% {
        clip-path: inset(80% 0 10% 0);
        transform: translate(2px, -1px);
    }

    40% {
        clip-path: inset(10% 0 80% 0);
        transform: translate(-2px, 2px);
    }

    60% {
        clip-path: inset(50% 0 20% 0);
        transform: translate(1px, -2px);
    }

    80% {
        clip-path: inset(20% 0 60% 0);
        transform: translate(-1px, 1px);
    }
}

/* LAYOUT SYSTEM */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
}

    .sidebar.collapsed {
        width: var(--sidebar-collapsed);
    }

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(10, 10, 10, 0.8);
}

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

.logo-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-fire);
    border-radius: 12px;
    font-size: 1.5rem;
    box-shadow: var(--shadow-glow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-glow);
    }

    50% {
        transform: scale(1.05);
        box-shadow: var(--shadow-neon);
    }
}

.logo-text {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    transition: opacity 0.3s;
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
}

/* NAV MENU */
.nav-menu {
    padding: 1.5rem 0;
    overflow-y: auto;
    height: calc(100vh - var(--header-height) - 100px);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    margin: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    overflow: hidden;
}

    .nav-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: var(--gradient-fire);
        opacity: 0.1;
        transition: left 0.3s;
    }

    .nav-link:hover::before {
        left: 0;
    }

    .nav-link:hover {
        color: var(--primary-orange);
        transform: translateX(5px);
    }

    .nav-link.active {
        color: var(--text-primary);
        background: rgba(255, 107, 53, 0.1);
        border-left: 3px solid var(--primary-orange);
    }

.nav-icon {
    width: 24px;
    margin-right: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--primary-red);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
    animation: shake 2s infinite;
}

@keyframes shake {
    0%, 100% {
        transform: rotate(0deg);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: rotate(-2deg);
    }

    20%, 40%, 60%, 80% {
        transform: rotate(2deg);
    }
}

/* MAIN CONTENT */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s;
    min-height: 100vh;
    position: relative;
}

.sidebar.collapsed ~ .main-wrapper {
    margin-left: var(--sidebar-collapsed);
}

/* HEADER */
.main-header {
    height: var(--header-height);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.header-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* CONTENT AREA */
.main-content {
    padding: 2rem;
    max-width: var(--container-max);
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* CARDS */
.card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

    .card::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
    }

    .card:hover {
        transform: translateY(-5px);
        border-color: var(--primary-orange);
        box-shadow: var(--shadow-glow);
    }

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

/* BUTTONS */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--gradient-fire);
    color: white;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-fire);
    }

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

    .btn-secondary:hover {
        background: var(--primary-orange);
        color: var(--dark-bg);
    }

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

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .main-wrapper {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

@media (min-width: 1025px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* ANIMATIONS */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

/* SPECIAL EFFECTS */
.neon-text {
    text-shadow: 0 0 10px var(--primary-orange), 0 0 20px var(--primary-orange), 0 0 30px var(--primary-orange), 0 0 40px var(--primary-red);
}

.fire-text {
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.8));
}

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

/* MODAL */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* TERRITORY MAP STYLES */
.territory-map {
    height: 600px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.territory-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 12px;
    z-index: 1000;
}

.territory-marker {
    animation: pulse 2s infinite;
}

/* CHAT STYLES */
.chat-container {
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 1rem;
    animation: messageIn 0.3s ease-out;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.message-user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.message-bubble {
    max-width: 70%;
    padding: 1rem;
    border-radius: 16px;
    position: relative;
}

.message-user .message-bubble {
    background: var(--gradient-fire);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-ai .message-bubble {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.chat-input-container {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(10, 10, 10, 0.8);
}

.chat-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

    .chat-input:focus {
        border-color: var(--primary-orange);
        box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    }

/* VIDEO GRID */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.video-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

    .video-card:hover {
        transform: scale(1.03);
    }

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 107, 53, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.video-card:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--primary-orange);
}

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

.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-fire);
    border-radius: 50%;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
}

/* GARAGE STYLES */
.garage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
}

.garage-slot {
    aspect-ratio: 1;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    cursor: pointer;
}

    .garage-slot:hover {
        border-color: var(--primary-orange);
        background: rgba(255, 107, 53, 0.05);
    }

    .garage-slot.occupied {
        background: rgba(255, 107, 53, 0.1);
        border-style: solid;
    }

/* LIFESTYLE GALLERY */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

/* UTILITIES */
.text-gradient {
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blur-bg {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }

    .main-content {
        padding: 1rem;
    }

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

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

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

    .chat-container {
        height: calc(100vh - 200px);
    }

    .territory-map {
        height: 400px;
    }
}

/* DARK MODE ENHANCEMENTS */
@media (prefers-color-scheme: dark) {
    :root {
        --shadow-glow: 0 0 40px rgba(255, 107, 53, 0.6);
        --shadow-neon: 0 0 60px rgba(255, 107, 53, 0.9);
    }
}
