/* ============================================================
   ŁEKER ROLEPLAY DASHBOARD — style.css
   Dark blue theme z glowy efektami
   ============================================================ */

:root {
    --bg-deep:      #080c14;
    --bg-main:      #0d1117;
    --bg-card:      #111827;
    --bg-card-hover:#161f2e;
    --border:       #1e2d45;
    --border-glow:  #2563eb44;
    --accent-1:     #3b82f6;
    --accent-2:     #06b6d4;
    --accent-grad:  linear-gradient(135deg, #3b82f6, #06b6d4);
    --accent-glow:  0 0 24px #3b82f640, 0 0 48px #06b6d420;
    --text-primary: #e2e8f0;
    --text-second:  #94a3b8;
    --text-muted:   #475569;
    --danger:       #ef4444;
    --danger-dark:  #991b1b;
    --success:      #22c55e;
    --warning:      #f59e0b;
    --font-head:    'Plus Jakarta Sans', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-lg:    20px;
    --transition:   .2s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -10%, #1e3a5f33 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 90% 80%, #06294433 0%, transparent 60%);
    color: var(--text-primary);
    font-family: var(--font-head);
    min-height: 100vh;
    line-height: 1.6;
}

/* ---- Stars background ---- */
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.star {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    animation: twinkle var(--tw-dur, 3s) var(--tw-delay, 0s) ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .1; } to { opacity: .7; } }

/* ---- Navbar ---- */
.navbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: .85rem 2rem;
    background: #0a111bcc;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    display: flex; align-items: center; gap: .6rem;
    text-decoration: none; color: var(--text-primary);
    font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em;
}
.logo-icon { font-size: 1.4rem; }
.logo-text strong { background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-user { display: flex; align-items: center; gap: .75rem; }

.nav-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    border: 2px solid var(--accent-1);
    box-shadow: 0 0 10px #3b82f640;
}
.nav-username { font-size: .9rem; color: var(--text-second); font-family: var(--font-mono); }

.btn-logout {
    font-family: var(--font-head);
    font-size: .8rem; font-weight: 600;
    padding: .35rem .85rem;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition);
}
.btn-logout:hover { color: var(--danger); border-color: var(--danger); background: #ef444410; }

/* ---- Main content ---- */
main {
    position: relative; z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* ---- Page header ---- */
.page-header { margin-bottom: 2rem; }
.page-header h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -.03em;
    background: var(--accent-grad);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-header p { color: var(--text-second); margin-top: .35rem; font-size: .95rem; }

/* ---- Cards grid ---- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeInUp .4s ease both;
}
.card::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--accent-grad);
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: inherit;
}
.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-1);
    box-shadow: var(--accent-glow);
    transform: translateY(-3px);
}
.card:hover::before { opacity: .04; }

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

/* ---- Server card ---- */
.server-card { cursor: pointer; text-decoration: none; display: block; color: inherit; }
.server-icon {
    width: 56px; height: 56px; border-radius: 14px;
    object-fit: cover;
    border: 2px solid var(--border);
    margin-bottom: 1rem;
}
.server-icon-placeholder {
    width: 56px; height: 56px; border-radius: 14px;
    background: var(--accent-grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    border: 2px solid var(--border);
}
.server-name { font-size: 1rem; font-weight: 700; margin-bottom: .25rem; }
.server-meta { font-size: .8rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ---- Character card ---- */
.char-card {
    display: flex; flex-direction: column; gap: .85rem;
}
.char-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.char-name { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.char-badge {
    font-family: var(--font-mono);
    font-size: .7rem;
    padding: .2rem .55rem;
    background: #3b82f615;
    border: 1px solid #3b82f630;
    border-radius: 999px;
    color: var(--accent-1);
    white-space: nowrap;
}
.char-fields { display: flex; flex-direction: column; gap: .4rem; }
.char-field {
    display: flex; align-items: center; gap: .5rem;
    font-size: .82rem;
}
.char-field-label { color: var(--text-muted); font-family: var(--font-mono); min-width: 90px; }
.char-field-value { color: var(--text-second); }
.char-actions { display: flex; gap: .5rem; margin-top: auto; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .55rem 1.2rem;
    font-family: var(--font-head);
    font-size: .85rem; font-weight: 700;
    border-radius: var(--radius-sm);
    border: none; cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    line-height: 1;
}
.btn-primary {
    background: var(--accent-grad);
    color: #fff;
    box-shadow: 0 0 16px #3b82f640;
}
.btn-primary:hover { box-shadow: 0 0 24px #3b82f680; transform: translateY(-1px); filter: brightness(1.1); }

.btn-secondary {
    background: transparent;
    color: var(--text-second);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: #ffffff08; border-color: var(--accent-1); color: var(--text-primary); }

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid #ef444430;
}
.btn-danger:hover { background: #ef444415; border-color: var(--danger); }

.btn-full { width: 100%; }
.btn-sm { padding: .4rem .8rem; font-size: .78rem; }

/* ---- Login page ---- */
.login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem;
    position: relative; z-index: 1;
}
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    max-width: 480px; width: 100%;
    text-align: center;
    box-shadow: 0 0 80px #3b82f615, 0 0 160px #06b6d408;
    animation: fadeInUp .6s ease both;
}
.login-icon { font-size: 3.5rem; margin-bottom: 1rem; display: block; }
.login-title {
    font-size: 2rem; font-weight: 800; letter-spacing: -.03em;
    background: var(--accent-grad);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .5rem;
}
.login-subtitle { color: var(--text-second); font-size: .95rem; margin-bottom: 2rem; line-height: 1.5; }
.login-features { list-style: none; text-align: left; margin-bottom: 2rem; display: flex; flex-direction: column; gap: .6rem; }
.login-features li {
    display: flex; align-items: center; gap: .75rem;
    font-size: .9rem; color: var(--text-second);
}
.login-features li::before {
    content: '▶';
    font-size: .7rem;
    color: var(--accent-1);
    flex-shrink: 0;
}
.login-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.login-version { font-family: var(--font-mono); font-size: .75rem; color: var(--text-muted); margin-top: 1.5rem; }

/* ---- Forms ---- */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 560px;
    animation: fadeInUp .4s ease both;
}
.form-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.form-label { font-size: .82rem; font-weight: 600; color: var(--text-second); letter-spacing: .02em; text-transform: uppercase; }
.form-input, .form-select {
    background: #0a111b;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: .9rem;
    padding: .65rem 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
    outline: none;
}
.form-input:focus, .form-select:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px #3b82f620;
}
.form-select option { background: #0d1117; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex; align-items: center; gap: .5rem;
    font-size: .82rem; color: var(--text-muted);
    margin-bottom: 1.5rem; font-family: var(--font-mono);
}
.breadcrumb a { color: var(--accent-1); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }

/* ---- Flash messages ---- */
.flash {
    padding: .85rem 1.2rem;
    border-radius: var(--radius-md);
    font-size: .9rem; font-weight: 600;
    margin-bottom: 1.5rem;
    animation: fadeInUp .3s ease both;
    display: flex; align-items: center; gap: .6rem;
}
.flash-success { background: #22c55e15; border: 1px solid #22c55e40; color: var(--success); }
.flash-error   { background: #ef444415; border: 1px solid #ef444440; color: var(--danger); }

/* ---- Empty state ---- */
.empty-state {
    text-align: center; padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; display: block; opacity: .5; }
.empty-state p { font-size: .95rem; }

/* ---- Admin badge ---- */
.admin-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    font-family: var(--font-mono); font-size: .7rem;
    padding: .2rem .65rem;
    background: #f59e0b15; border: 1px solid #f59e0b30;
    border-radius: 999px; color: var(--warning);
}

/* ---- Footer ---- */
.site-footer {
    position: relative; z-index: 1;
    text-align: center;
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: .75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}
.footer-link {
    color: var(--accent-1);
    text-decoration: none;
    transition: color var(--transition);
}
.footer-link:hover { color: var(--accent-2); text-decoration: underline; }

/* ---- Confirm overlay ---- */
.confirm-overlay {
    position: fixed; inset: 0;
    background: #000000bb;
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    animation: fadeIn .15s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.confirm-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 380px; width: 90%;
    text-align: center;
    animation: fadeInUp .2s ease both;
}
.confirm-box h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.confirm-box p { color: var(--text-second); font-size: .9rem; margin-bottom: 1.5rem; }
.confirm-actions { display: flex; gap: .75rem; justify-content: center; }

/* ---- Invite card (dodaj bota) ---- */
.invite-card {
    border-style: dashed;
    border-color: var(--accent-1);
    opacity: .85;
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}
.invite-card:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: var(--accent-glow);
}
@media (max-width: 600px) {
    .navbar { padding: .75rem 1rem; }
    main { padding: 1.5rem 1rem 3rem; }
    .login-card { padding: 2rem 1.25rem; }
    .form-card { padding: 1.5rem 1rem; }
    .card-grid { grid-template-columns: 1fr; }
}
