/**
 * ═════════════════════════════════════════════════════════════════════════════
 * PLIK: global.css - GLOBALNE STYLE (wspólne dla User i Admin)
 * ═════════════════════════════════════════════════════════════════════════════
 *
 * ZAWARTOŚĆ:
 * ═══════════
 * 1. CZCIONKI (fonts.css)
 * 2. RESET I PODSTAWY (base.css)
 * 3. ANIMACJE (animations.css)
 * 4. POWIADOMIENIA I ALERTY (notifications.css)
 *
 * ═════════════════════════════════════════════════════════════════════════════
 */

/* ═════════════════════════════════════════════════════════════════════════════
   1. CZCIONKI
   ═════════════════════════════════════════════════════════════════════════════ */

/* Import czcionki Teko - główna czcionka aplikacji */
@import url("https://fonts.googleapis.com/css2?family=Teko:wght@300;400;500;600;700&display=swap");

/* Import czcionki Orbitron - dla liczb */
@import url("https://fonts.googleapis.com/css2?family=Black+Ops+One&family=Orbitron:wght@500;700&display=swap");

/* Konfiguracja czcionki dla liczb - ORBITRON */
@font-face {
    font-family: "NumbersOnly";
    src: local("Orbitron");
    unicode-range: U+0030-0039; /* Tylko cyfry 0-9 */
}

/* Podstawowa czcionka dla body i głównych elementów */
body,
.user-balance,
.stat-value,
.noise_btn,
.dropdown-menu,
.user-footer,
.app-footer,
.dashboard-header,
.stat-label,
.admin-content,
.admin-header {
    font-family: "Teko", "NumbersOnly", Helvetica, Arial, sans-serif;
}

/* Zmienna CSS dla czcionki liczb */
* {
    --number-font: "Orbitron", sans-serif;
}

/* Elementy używające czcionki Orbitron dla liczb */
.number,
[class*="number"],
[class*="count"],
[class*="value"] {
    font-family: var(--number-font) !important;
}

/* Wyjątki - elementy które NIE powinny używać Orbitron */
.user-balance span:last-of-type,
.user-balance [data-points],
.user-balance .points-value {
    font-family: "Teko", Helvetica, Arial, sans-serif !important;
}

/* Statystyki - używają Orbitron */
.stat-value,
.stat-card .value,
[class*="stat-"] .number {
    font-family: var(--number-font) !important;
}

/* Tabular numbers - równa szerokość cyfr */
body *:not(script):not(style) {
    font-variant-numeric: tabular-nums;
}

/* Klasa pomocnicza dla stylizowanych liczb */
.styled-number {
    font-family: "Orbitron", sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em;
    display: inline-block;
}

/* Liczby w user-balance - czerwone cienie */
.user-balance .styled-number {
    font-size: 1.1em;
    color: #fff;
    letter-spacing: 2px;
    font-family: "Orbitron", sans-serif !important;
    font-weight: 700;
    text-shadow:
        0 0 8px #cc0000,
        0 0 0px #cc0000,
        0 0 20px #000000,
        2px 2px 14px #000000,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff;
}

/* Liczby w statystykach */
.stat-value .styled-number {
    font-size: 1em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Liczby w przyciskach */
.noise_btn .styled-number {
    font-size: 1.2em;
}

/* ═════════════════════════════════════════════════════════════════════════════
   2. RESET I PODSTAWY
   ═════════════════════════════════════════════════════════════════════════════ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    min-width: 0; /* Umożliwia kurczenie elementów */
}

html {
    background-color: #000; /* Zapobiega białemu tłu podczas ładowania */
}

/* PRZYWRÓCONE TŁO NA BODY - naprawia brak tła na Login/Register/Admin */
body {
    font-family: "Teko", Helvetica, Arial, sans-serif;
    color: #ffffff;
    
    /* TŁO STRONY */
    background-image: url("../images/background.webp");
    background-color: #000;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    
    /* Przesunięcie w górę o 10px (sztywne) */
    background-position: center -10px !important;
    
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* USUNIĘTO #global-background (powodował problemy na innych stronach) */

/* TYPOGRAFIA - Nagłówki */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Teko", Helvetica, Arial, sans-serif;
    color: #fff;
    font-weight: 600;
}

h1 {
    font-size: 35px;
    margin-bottom: 25px;
    letter-spacing: 3px;
}

h2 {
    font-size: 28px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

h3 {
    font-size: 22px;
    margin-bottom: 15px;
    letter-spacing: 1.5px;
}

/* LINKI */
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* GŁÓWNY CONTENT - Layout */
.main-content {
    flex: 1;
    padding: 20px;
    background: transparent !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.content-area {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

/* GLASSMORPHISM - Klasyczny szklany panel */
.glass-pane {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border-radius: 12px;
    padding: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
}

/* ═════════════════════════════════════════════════════════════════════════════
   3. ANIMACJE
   ═════════════════════════════════════════════════════════════════════════════ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* ═════════════════════════════════════════════════════════════════════════════
   4. POWIADOMIENIA I ALERTY
   ═════════════════════════════════════════════════════════════════════════════ */

.notifications-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.notification {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(68, 68, 68, 0.7) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
}

.notification-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 18px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.notification.success .notification-icon {
    color: #4f8a10;
}

.notification.error .notification-icon {
    color: #ff6b6b;
}

.notification.warning .notification-icon {
    color: #ff8c00;
}

.notification.info .notification-icon {
    color: rgb(102, 126, 234);
}

.alert {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(68, 68, 68, 0.7) !important;
    color: #fff;
    font-weight: bold;
    border-radius: 16px;
    padding: 15px 20px;
    margin: 20px 0;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
}

.alert.error {
    color: #ff6b6b;
}

.alert.success {
    color: #4f8a10;
}

.alert.warning {
    color: #ff8c00;
}

.alert.info {
    color: rgb(102, 126, 234);
}

.flash-message {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    border: 1px solid rgba(68, 68, 68, 0.7) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.flash-message.success {
    color: #6ee7b7;
}

.flash-message.error {
    color: #fca5a5;
}

.flash-message.warning {
    color: #fcd34d;
}

.flash-message i {
    font-size: 20px;
}

/* MEDIA QUERIES (RESPONSIVE) */
@media (max-width: 400px) {
    .notifications-container {
        left: 20px;
        right: 20px;
        max-width: none;
        top: 70px;
    }
}


/* ─── SHAKE ANIMATION FOR NUMBERS ─── */
@keyframes shakeAnim {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-3px); }
    50%  { transform: translateX(3px); }
    75%  { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}
.shake {
    animation: shakeAnim 0.15s ease-in-out;
}

