/* ==========================================================================
   GlowNetwork - Windows Aero / Frutiger Aero Theme (style.css)
   Inspirowane stylem Windows Aero (Vista / 7, 2007-2009)
   ========================================================================== */

:root {
    --font-family: "Segoe UI", Tahoma, Geneva, Verdana, Arial, sans-serif;
    
    /* Tła i okna */
    --bg-page: radial-gradient(ellipse at top, #d6eaf8 0%, #8fc2eb 45%, #4687c4 100%) fixed;
    --card-bg: #eef3f9;
    --card-border: #6a93b5;
    --card-shadow: 0 6px 20px rgba(0, 20, 50, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    --card-alt: #f4f8fc;
    
    /* Aero Titlebar & Nagłówki */
    --header-gradient: linear-gradient(to bottom, #dff0fc 0%, #a9d3f5 8%, #6fb3ea 22%, #2f8ede 45%, #1c6fc4 55%, #1256a3 75%, #0d4483 100%);
    --header-border-bottom: #0a3a70;
    --header-text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
    
    /* Szklane przyciski Aero */
    --btn-gradient: linear-gradient(to bottom, #ffffff 0%, #e7f1fb 45%, #cfe4f7 46%, #bcd9f3 100%);
    --btn-gradient-hover: linear-gradient(to bottom, #ffffff 0%, #f0f8ff 45%, #d9ecfc 46%, #c9e4fb 100%);
    --btn-gradient-active: linear-gradient(to bottom, #bcd9f3 0%, #cfe4f7 100%);
    --btn-border: #6c93b0;
    --btn-border-hover: #4e7f9f;
    --btn-text: #14395e;
    
    /* Kolory tekstu */
    --text-primary: #1c3f60;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-footer: #4a6b8a;
    
    /* Linki */
    --primary: #1256a3;
    --primary-hover: #0d4483;
    --primary-light: #e2effd;
    
    /* Stopka */
    --footer-bg: #dbe7f3;
    --footer-border: #a2c1db;
    
    /* Ramki ogólne */
    --border: #b8d2e8;
}

/* ================= Reset i elementy bazowe ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100vh;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-body);
    background: var(--bg-page);
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 12px;
}

/* Typografia i nagłówki */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 8px;
}

h1 { font-size: 1.4rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

p {
    font-size: 14px;
    color: var(--text-body);
    margin-bottom: 10px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 12px 0;
}

/* ================= Aero Okna / Karty / Header ================= */
header, section, .card, .aero-window {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 18px;
    margin-bottom: 14px;
    position: relative;
}

/* ================= Header strony ================= */
header {
    padding: 0;
    overflow: hidden;
}

.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: var(--header-gradient);
    border-bottom: 1px solid var(--header-border-bottom);
    position: relative;
}

/* Górny szklany połysk (Aero gloss reflection) */
.header-top-bar::after, .aero-titlebar::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 48%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 7px 7px 0 0;
    pointer-events: none;
}

.header-top-bar a img, header img {
    height: 38px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
    display: block;
    position: relative;
    z-index: 1;
}

.header-actions {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    padding: 10px 18px 2px 18px;
}

/* Pasek z nawigacją i powitaniem w headerze */
header > p {
    padding: 4px 18px 0 18px;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

header > nav, header nav {
    padding: 10px 18px 14px 18px;
}

/* ================= System Passy (Daily Streaks) ================= */
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    vertical-align: middle;
    text-decoration: none;
}

/* Pomarańczowa z ogniem - gdy dzisiaj napisano i passa jest aktywna */
.streak-badge.active {
    background: linear-gradient(to bottom, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
    border: 1px solid #ea580c;
    color: #9a3412;
    box-shadow: 0 0 6px rgba(234, 88, 12, 0.3);
}

/* Szara bez ognia - gdy w danym dniu (00:00-23:59) użytkownik jeszcze nie napisał */
.streak-badge.waiting {
    background: linear-gradient(to bottom, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #94a3b8;
    color: #64748b;
}

.streak-badge.pending {
    background: linear-gradient(to bottom, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.streak-badge.restore {
    background: linear-gradient(to bottom, #faf5ff 0%, #f3e8ff 100%);
    border: 1px solid #a855f7;
    color: #7e22ce;
    cursor: pointer;
}

.streak-badge.restore:hover {
    background: linear-gradient(to bottom, #f3e8ff 0%, #e9d5ff 100%);
}

/* ================= Interaktywne Embedy w Wiadomościach Czatu ================= */
.chat-embed-box {
    display: block;
    margin: 6px 0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.chat-embed-passa {
    background: linear-gradient(135deg, #fffbf5 0%, #ffedd5 100%);
    border: 1px solid #fdba74;
    color: #9a3412;
}

.chat-embed-expired {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.chat-embed-restored {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    color: #166534;
}

.chat-embed-flex {
    background: linear-gradient(135deg, #1e1b4b 0%, #2e1065 50%, #0f172a 100%);
    border: 1px solid #818cf8;
    color: #f8fafc;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.chat-embed-flex-title {
    font-size: 1rem;
    font-weight: 800;
    color: #fde047;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-embed-flex-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.84rem;
}

.chat-embed-flex-pill {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 6px;
    color: #e0e7ff;
}

.embed-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ================= Panel Emotek (Emoji Picker) ================= */
.emoji-picker-container {
    position: relative;
    display: inline-block;
}

.emoji-toggle-btn {
    background: linear-gradient(to bottom, #ffffff 0%, #e7f1fb 100%);
    border: 1px solid #6c93b0;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.1s, background 0.15s;
    vertical-align: middle;
}

.emoji-toggle-btn:hover {
    background: linear-gradient(to bottom, #ffffff 0%, #d8ebfb 100%);
    transform: scale(1.05);
}

.emoji-popover {
    display: none;
    position: absolute;
    bottom: 42px;
    left: 0;
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #6a93b5;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 20, 50, 0.25);
    width: 280px;
    padding: 8px;
}

.emoji-popover.active {
    display: block;
    animation: popoverFade 0.15s ease-out;
}

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

.emoji-popover-header {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: 4px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
    padding: 2px;
}

.emoji-item {
    font-size: 1.25rem;
    padding: 4px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s, transform 0.1s;
    user-select: none;
}

.emoji-item:hover {
    background: #e0f2fe;
    transform: scale(1.2);
}

/* Aero Titlebar dla okienek */
.aero-titlebar {
    position: relative;
    padding: 10px 16px;
    font-weight: bold;
    font-size: 1rem;
    color: #ffffff;
    text-shadow: var(--header-text-shadow);
    background: var(--header-gradient);
    border-bottom: 1px solid var(--header-border-bottom);
}

.aero-body {
    padding: 18px;
}

/* ================= Nawigacja ================= */
nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

nav a, .nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--btn-text);
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid var(--btn-border);
    background: var(--btn-gradient);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

nav a:hover, .nav-btn:hover {
    background: var(--btn-gradient-hover);
    border-color: var(--btn-border-hover);
    color: #0d365f;
    box-shadow: 0 2px 4px rgba(0, 30, 60, 0.25), inset 0 1px 0 #ffffff;
    text-decoration: none;
}

nav a:active, .nav-btn:active {
    background: var(--btn-gradient-active);
    box-shadow: inset 0 1px 3px rgba(0, 30, 70, 0.35);
}

/* Aktywny link nawigacyjny */
nav a.active, nav a:has(strong) {
    background: var(--btn-gradient-hover);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), inset 0 1px 0 #ffffff;
}

nav a strong {
    font-weight: 700;
    color: #0b3d75;
}

/* Badge powiadomień w nawigacji */
.nav-badge-total, .nav-badge-pw, .nav-badge-friends, .nav-badge {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff !important;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 14px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: inline-block;
    vertical-align: middle;
}

/* ================= Przyciski i Kontrolki ================= */
button, input[type="submit"], .glass-btn {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 5px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--btn-text);
    cursor: pointer;
    border: 1px solid var(--btn-border);
    background: var(--btn-gradient);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.15s ease;
    text-decoration: none;
}

button:hover, input[type="submit"]:hover, .glass-btn:hover {
    background: var(--btn-gradient-hover);
    border-color: var(--btn-border-hover);
    color: #0b2b4e;
    box-shadow: 0 2px 5px rgba(0, 40, 90, 0.25), inset 0 1px 0 #ffffff;
}

button:active, input[type="submit"]:active, .glass-btn:active {
    background: var(--btn-gradient-active);
    box-shadow: inset 0 1px 3px rgba(0, 30, 70, 0.35);
}

button:disabled, input[type="submit"]:disabled {
    background: #d8e3ed;
    border-color: #b5c7d8;
    color: #7f99b2;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Pola tekstowe i formularze */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea,
.aero-input {
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #7f9db9;
    border-radius: 5px;
    background: linear-gradient(to bottom, #ffffff 0%, #f4f9fd 100%);
    box-shadow: inset 0 1px 3px rgba(0, 40, 80, 0.22);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus,
.aero-input:focus {
    outline: none;
    border-color: #2b7bc4;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(47, 142, 222, 0.4);
}

input[type="checkbox"], input[type="radio"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    padding: 0 !important;
    margin: 0 6px 0 0 !important;
    display: inline-block !important;
    cursor: pointer;
    vertical-align: middle;
    accent-color: #1256a3;
    box-shadow: none !important;
    background: none !important;
}

label {
    font-weight: 600;
    color: var(--text-primary);
    display: inline-block;
    margin-bottom: 4px;
}

/* ================= Tabele ================= */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #9dbedb;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    margin: 8px 0;
}

th, td {
    padding: 9px 12px;
    text-align: left;
    font-size: 0.9rem;
}

th {
    background: linear-gradient(to bottom, #f2f7fc 0%, #d8e8f6 100%);
    color: #14395e;
    font-weight: bold;
    border-bottom: 1px solid #9dbedb;
}

td {
    border-bottom: 1px solid #e1ecf6;
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) td {
    background: #f8fbfe;
}

/* ================= Odznaki i Powiadomienia ================= */
.nav-badge-pw, .nav-badge-friends, .nav-badge-total {
    background: linear-gradient(to bottom, #ff5e5e 0%, #e11d48 50%, #b91c1c 100%);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    display: inline-block;
    vertical-align: middle;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}

.aero-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.aero-badge.verified {
    background: linear-gradient(to bottom, #c9f0b0, #8fce5c);
    color: #254a0c;
    border: 1px solid #5f9a34;
}

.aero-badge.unverified {
    background: linear-gradient(to bottom, #f7cfa0, #eb9c4e);
    color: #5a3405;
    border: 1px solid #c47a26;
}

/* Specjalna odznaka OG GlowNetwork */
.badge-og {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
    color: #78350f;
    border: 1px solid #b45309;
    box-shadow: 0 2px 5px rgba(245, 158, 11, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    cursor: default;
    animation: ogPulse 3s infinite ease-in-out;
}

@keyframes ogPulse {
    0%, 100% {
        box-shadow: 0 2px 5px rgba(245, 158, 11, 0.35);
    }
    50% {
        box-shadow: 0 3px 10px rgba(245, 158, 11, 0.65);
    }
}

/* Komunikaty statusu */
.aero-status {
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 12px;
    font-weight: 600;
    border: 1px solid;
}

.aero-status.ok {
    background: #e3f7d8;
    border-color: #7fbf4d;
    color: #2f5a13;
}

.aero-status.err {
    background: #fde3e3;
    border-color: #d97a7a;
    color: #7a1f1f;
}

/* ================= Modal (Centrum Powiadomień) ================= */
.notif-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 24, 48, 0.65);
    backdrop-filter: blur(4px);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.notif-modal-overlay.active {
    display: flex;
}

.notif-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    width: 92%;
    max-width: 480px;
    max-height: 82vh;
    overflow-y: auto;
    padding: 0;
    box-shadow: 0 14px 40px rgba(0, 20, 60, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.notif-modal-header {
    background: var(--header-gradient);
    color: #ffffff;
    padding: 10px 16px;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-shadow: var(--header-text-shadow);
    border-bottom: 1px solid var(--header-border-bottom);
}

.notif-modal-header h3 {
    color: #ffffff;
    margin: 0;
    font-size: 1rem;
}

.notif-modal-close {
    background: linear-gradient(to bottom, #ff8c8c 0%, #e03131 50%, #c92a2a 100%);
    color: white;
    border: 1px solid #991b1b;
    border-radius: 4px;
    width: 22px;
    height: 22px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.notif-modal-close:hover {
    background: linear-gradient(to bottom, #ffa8a8 0%, #f03e3e 50%, #d6336c 100%);
}

.notif-modal-body {
    padding: 16px;
}

.notif-section {
    margin-bottom: 12px;
}

.notif-section-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: #14395e;
    margin-bottom: 6px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--border);
}

.notif-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 6px;
    gap: 8px;
}

.notif-item-actions {
    display: flex;
    gap: 4px;
}

.notif-btn-accept {
    background: linear-gradient(to bottom, #d2f8c5, #7ec953);
    border: 1px solid #54962c;
    color: #1e4b09;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
}

.notif-btn-reject {
    background: linear-gradient(to bottom, #ffd6d6, #e67373);
    border: 1px solid #aa3737;
    color: #660f0f;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
}

/* ================= Czat, PW, Osiągnięcia i Minigry ================= */
#chat-box, #pm-box {
    background: #ffffff;
    border: 1px solid #8daec9;
    border-radius: 6px;
    box-shadow: inset 0 1px 4px rgba(0, 30, 60, 0.15);
    padding: 12px;
}

.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.ach-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #a6c6e0;
    background: linear-gradient(135deg, #ffffff 0%, #edf4fc 100%);
    box-shadow: 0 3px 10px rgba(0, 25, 60, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transition: all 0.2s ease;
}

.ach-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 40, 90, 0.16);
    border-color: #5c93c4;
}

.ach-card-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ach-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ffffff 0%, #e3effd 100%);
    border: 1px solid #a3c7e8;
    box-shadow: 0 2px 5px rgba(0, 20, 50, 0.1), inset 0 1px 0 #ffffff;
}

.ach-info {
    flex: 1;
    min-width: 0;
}

.ach-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #14395e;
    line-height: 1.25;
}

.ach-info p {
    margin: 0;
    font-size: 0.82rem;
    color: #4b6b88;
    line-height: 1.35;
}

.ach-card-bottom {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(184, 210, 232, 0.6);
}

/* Karta odblokowana */
.ach-card.unlocked {
    background: linear-gradient(135deg, #f7fdf5 0%, #e5f7dc 100%);
    border: 1.5px solid #6ab93a;
    box-shadow: 0 4px 14px rgba(40, 130, 30, 0.15), inset 0 1px 0 #ffffff;
}

.ach-card.unlocked .ach-icon-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #def7cf 100%);
    border-color: #72be42;
    box-shadow: 0 2px 6px rgba(40, 130, 30, 0.18), inset 0 1px 0 #ffffff;
}

.ach-card.unlocked .ach-info h4 {
    color: #174d08;
}

.ach-badge-unlocked {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    background: linear-gradient(to bottom, #d6f9c0 0%, #87d754 100%);
    border: 1px solid #529624;
    border-radius: 4px;
    padding: 3px 8px;
    font-weight: 700;
    font-size: 0.76rem;
    color: #164205;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ach-badge-unlocked .ach-date {
    font-weight: 600;
    color: #1e5907;
    font-size: 0.72rem;
}

/* Karta zablokowana */
.ach-card.locked {
    background: linear-gradient(135deg, #ffffff 0%, #edf3f8 100%);
    border-color: #b2cadf;
}

.ach-progress-info {
    font-size: 0.78rem;
    color: #5c7894;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.ach-lock-label {
    font-weight: 600;
    color: #456584;
}

.progress-bar-wrap {
    background: #d8e5f2;
    border: 1px solid #9bbcd7;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 20, 50, 0.15);
}

.progress-bar-fill {
    background: linear-gradient(to bottom, #72c3f8 0%, #2f8ede 50%, #1562b3 100%);
    height: 100%;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: width 0.3s ease;
}

.avatar-box {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #6c93b0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ================= Stopka ================= */
footer {
    padding: 10px 18px;
    background: var(--footer-bg);
    color: var(--text-footer);
    font-size: 11px;
    text-align: center;
    border: 1px solid var(--footer-border);
    border-radius: 6px;
    margin-top: 14px;
    box-shadow: 0 2px 8px rgba(0, 20, 50, 0.1);
}

footer p {
    font-size: 11px;
    color: var(--text-footer);
    margin: 3px 0;
}

footer a {
    color: var(--primary);
    font-weight: 600;
}

footer a:hover {
    color: var(--primary-hover);
}

/* ================= Paski przewijania (Scrollbar) ================= */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #eef3f9;
    border: 1px solid #b8d2e8;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #cce4f7 0%, #9fc3e6 50%, #7aa8d4 100%);
    border: 1px solid #5d8ab5;
    border-radius: 5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #bfe0fb 0%, #87b6e3 50%, #6398cf 100%);
}

/* ============================================================================
   RESPONSYWNOŚĆ (PC, Tablet, Telefon, TV)
   ============================================================================ */

/* 1. Urządzenia mobilne (Smartfony: < 640px) */
@media (max-width: 640px) {
    body {
        padding: 8px 6px;
        font-size: 13px;
    }

    header, section, .card, .aero-window {
        padding: 12px;
        border-radius: 6px;
        margin-bottom: 10px;
    }

    .header-top-bar {
        padding: 8px 12px;
    }

    .header-top-bar a img, header img {
        width: 36px;
        height: 36px;
    }

    header h1 {
        font-size: 1.15rem;
        padding: 6px 12px 2px 12px;
    }

    header > p {
        padding: 2px 12px 0 12px;
        font-size: 0.82rem;
    }

    header > nav, header nav {
        padding: 6px 12px 10px 12px;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    nav a, .nav-btn, button, .glass-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-height: 38px;
    }

    /* Układy elastyczne w kolumnę */
    .pm-layout-container, main > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .card[style*="flex: 1"], .card[style*="flex: 2"] {
        width: 100% !important;
        min-width: 100% !important;
    }

    #pm-box, #chat-box {
        height: 260px !important;
    }

    /* Formularze wysyłania */
    #chat-form, #pm-form {
        display: flex;
        gap: 4px;
        width: 100%;
    }

    #chat-form input, #pm-form input {
        flex: 1;
        width: auto !important;
        font-size: 0.9rem;
    }

    .emoji-popover {
        width: 250px;
        left: -40px;
    }

    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    /* Clicker na mobile */
    .clicker-orb {
        width: 130px;
        height: 130px;
        font-size: 1.1rem;
    }

    .clicker-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .clicker-stat-card {
        padding: 8px 4px;
    }

    .clicker-stat-card .stat-val {
        font-size: 1.1rem;
    }
}

/* 2. Tablety (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    body {
        padding: 12px 10px;
        max-width: 100%;
    }

    #pm-box, #chat-box {
        height: 300px;
    }

    .clicker-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 3. Komputery PC & Laptopy (1025px - 1920px) */
@media (min-width: 1025px) and (max-width: 1920px) {
    body {
        max-width: 980px;
    }
}

/* 4. Duże ekrany TV & 4K (> 1920px) */
@media (min-width: 1921px) {
    body {
        max-width: 1280px;
        font-size: 16px;
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.6rem;
    }

    button, .glass-btn, .nav-btn {
        font-size: 0.95rem;
        padding: 8px 16px;
    }

    #pm-box, #chat-box {
        height: 440px;
    }

    .clicker-orb {
        width: 210px;
        height: 210px;
        font-size: 1.5rem;
    }
}

/* ================= Status Obecności (Online/Offline) ================= */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}
.status-badge.online {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}
.status-badge.offline {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}
.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}
.offline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: #94a3b8;
}

/* ================= Warning Modal (Ostrzeżenia) ================= */
.warning-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}
.warning-modal-overlay.active {
    display: flex;
}
.warning-modal-box {
    background: var(--card-bg, #ffffff);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.6);
    width: 100%;
    max-width: 520px;
    overflow: hidden;
    animation: warningPulse 0.3s ease-out;
}
@keyframes warningPulse {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.warning-modal-header {
    background: linear-gradient(to bottom, #fbbf24, #d97706);
    color: #78350f;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.warning-modal-body {
    padding: 20px;
    text-align: center;
    color: var(--text-primary);
}
.warning-reason-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px;
    border-radius: 6px;
    margin: 14px 0;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}

