/* 
   KickALL - Base Styles (Shared across all pages)
   Tema: Cyberpunk Dark Neon (Violet & Green)
   Boje: #8B5CF6 (Ljubičasta), #53FC18 (Neon zelena)
*/

/* ═══════════════════════════════════════════════════════════
   CSS Variables (Shared)
   ═══════════════════════════════════════════════════════════ */

:root {
    /* Primary Colors */
    --color-violet: #8B5CF6;
    --color-violet-glow: rgba(139, 92, 246, 0.5);
    --color-violet-dark: #6D28D9;
    --color-green: #53FC18;
    --color-green-glow: rgba(83, 252, 24, 0.5);
    --color-green-dark: #3FBA0E;
    --color-green-hover: #6eff35;

    /* Background Colors */
    --color-bg-dark: #06040A;
    --color-bg-panel: #0E0A1D;
    --color-bg-card: #130E26;
    --color-bg-input: #0A0614;

    /* Border Colors */
    --color-border: rgba(139, 92, 246, 0.15);
    --color-border-hover: rgba(83, 252, 24, 0.35);

    /* Text Colors */
    --color-text: #F8FAFC;
    --color-text-muted: #CBD5E1;
    --color-text-dark: #06040A;

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-violet: 0 0 25px rgba(139, 92, 246, 0.3);
    --shadow-green: 0 0 25px rgba(83, 252, 24, 0.3);
    --shadow-glass: 0 8px 32px 0 rgba(4, 3, 8, 0.5);

    /* Border Radius Scale */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Typographic Scale */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */

    /* Z-Index Scale */
    --z-bg: -1;
    --z-content: 1;
    --z-badge: 10;
    --z-overlay: 20;
    --z-coming-soon: 25;
    --z-modal: 100;
    --z-dropdown: 120;
    --z-header: 1000;
    --z-auth-gate: 9999;
}

/* ═══════════════════════════════════════════════════════════
   Reset & Base Styles
   ═══════════════════════════════════════════════════════════ */

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

html {
    font-size: 16px;
    overflow-x: hidden;
    touch-action: pan-y;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════
   Typography
   ═══════════════════════════════════════════════════════════ */

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* ═══════════════════════════════════════════════════════════
   Custom Scrollbar
   ═══════════════════════════════════════════════════════════ */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-violet) transparent;
}

/* WebKit pregledači (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-violet), var(--color-green));
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-green);
}

::selection {
    background: rgba(139, 92, 246, 0.2);
    color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════
   Shared Button Styles
   ═══════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 2px solid transparent;
    outline: none;
}

.btn:focus,
.btn:active {
    outline: none;
}

.btn:focus-visible {
    outline: 2px solid var(--color-green, #53FC18) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 14px rgba(83, 252, 24, 0.5) !important;
}

.btn-primary {
    background-color: var(--color-green);
    color: var(--color-text-dark) !important;
    -webkit-text-fill-color: var(--color-text-dark) !important;
    box-shadow: 0 4px 15px rgba(83, 252, 24, 0.2);
}

.btn-primary:hover {
    background-color: #6eff35 !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(83, 252, 24, 0.45);
}

.btn-secondary {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--color-text);
    border-color: rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background-color: var(--color-violet);
    color: var(--color-text);
    border-color: var(--color-violet);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.45);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.w-full {
    width: 100%;
}

.mt-4 {
    margin-top: 24px;
}

.inline-flex {
    display: inline-flex;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ═══════════════════════════════════════════════════════════
   Shared Badge Styles
   ═══════════════════════════════════════════════════════════ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 100px;
    color: var(--color-violet);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════
   Shared Animations
   ═══════════════════════════════════════════════════════════ */

@keyframes pulseBorder {
    0%,
    100% {
        border-color: rgba(139, 92, 246, 0.2);
    }
    50% {
        border-color: var(--color-violet);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ═══════════════════════════════════════════════════════════
   Shared Utility Classes
   ═══════════════════════════════════════════════════════════ */

.gradient-text {
    background: linear-gradient(135deg, var(--color-violet) 0%, var(--color-green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ═══════════════════════════════════════════════════════════
   Input & Form Elements
   ═══════════════════════════════════════════════════════════ */

input,
textarea,
select,
button {
    font-family: inherit;
}

button,
[role="button"],
.btn {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:focus {
    outline: none;
}

button:focus-visible,
[role="button"]:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--color-violet, #8b5cf6);
    outline-offset: 2px;
}

button:active:not(:disabled),
[role="button"]:active:not([aria-disabled="true"]),
.btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* Obavezna polja u formama */
.form-label.required::after,
label.required::after,
.form-label[data-required="true"]::after {
    content: " *";
    color: #ef4444;
}

/* ═══════════════════════════════════════════════════════════
   Accessibility: Screen reader utility & Accessible Skip Link
   ═══════════════════════════════════════════════════════════ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-link {
    position: absolute;
    top: -120px;
    left: 20px;
    z-index: 99999;
    padding: 12px 20px;
    background: var(--color-bg-dark, #06040A);
    color: var(--color-green, #53FC18);
    border: 2px solid var(--color-green, #53FC18);
    border-radius: 8px;
    font-weight: 700;
    font-family: var(--font-heading, sans-serif);
    text-decoration: none;
    transition: top var(--transition-fast, 0.2s ease);
    box-shadow: 0 0 20px rgba(83, 252, 24, 0.4);
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 20px;
    width: auto;
    height: auto;
    clip: auto;
    overflow: visible;
    white-space: normal;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════
   Prefers Reduced Motion (WCAG 2.2)
   ═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   Text Wrapping & Layout Integrity (Prevent Overflow Breaks)
   ═══════════════════════════════════════════════════════════ */

.card,
.panel,
.dashboard-card,
.stat-card,
.chat-message,
.feed-item,
.table-container td,
.table-container th,
.badge,
.modal-body {
    overflow-wrap: break-word;
    word-break: break-word;
}

