@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-color: #07070c;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;

    --card-bg: #111118;
    --nav-bg: rgba(7, 7, 12, 0.85);

    --border-color: rgba(168, 85, 247, 0.22);

    --accent: #a855f7;
    --accent-light: #c084fc;
    --accent-dark: #6b21a8;
    --accent-gradient: linear-gradient(135deg, #c084fc, #a855f7, #7c3aed);

    --danger: #ef4444;
    --warning: #c084fc;
    --info: #a78bfa;

    --console-bg: #050508;
}

[data-theme="dark"] {
    --bg-color: #07070c;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;

    --card-bg: #111118;
    --nav-bg: rgba(7, 7, 12, 0.85);

    --border-color: rgba(168, 85, 247, 0.22);
    --console-bg: #050508;
}

* { margin: 0; padding: 0; box-sizing: border-box; transition: background-color 0.2s, border-color 0.2s; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-main); }
a { text-decoration: none; color: inherit; }

/* Animacje i Utilitis */
.text-gradient { background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade { animation: fadeIn 0.4s ease forwards; }

/* Przyciski i Formularze */
.btn { padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; font-family: 'Inter', sans-serif; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; }
.btn-primary { background: var(--accent-gradient); color: white; box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.55); }
.btn-danger { background: var(--danger); color: white; }
.btn-outline { background: transparent; border: 1px solid rgba(168, 85, 247, 0.35); color: #c084fc; }
.btn-outline:hover { background: rgba(168, 85, 247, 0.12); border-color: rgba(192, 132, 252, 0.55); }
.input-field { width: 100%; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--border-color); background: #0b0b12; color: var(--text-main); font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.input-field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18); }

/* Nawigacja (Publiczna) */
header.public-nav { position: fixed; top: 0; width: 100%; background: var(--nav-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color); z-index: 1000; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: 'JetBrains Mono', monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
.nav-links { display: flex; gap: 24px; list-style: none; align-items: center; }
.nav-links a { font-weight: 600; opacity: 0.8; transition: 0.2s; }
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--accent-light); }

/* Powiadomienia Toast */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--card-bg); color: var(--text-main); padding: 15px 20px; border-radius: 8px; border-left: 4px solid var(--info); box-shadow: 0 10px 25px rgba(168, 85, 247, 0.18); display: flex; align-items: center; gap: 10px; animation: slideIn 0.3s ease forwards; font-weight: 500; }
.toast.success { border-left-color: var(--accent); }
.toast.error { border-left-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* === UKŁAD STRONY GŁÓWNEJ === */
.hero-section { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 120px 20px 40px; }
.hero-section h1 { font-size: 4.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 24px; letter-spacing: -1px; }
.hero-section p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin-bottom: 40px; }

.status-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(168, 85, 247, 0.12); color: var(--accent-light); padding: 8px 16px; border-radius: 50px; font-weight: 600; margin-bottom: 30px; font-size: 0.9rem; border: 1px solid rgba(168, 85, 247, 0.3); }
.status-dot { width: 10px; height: 10px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(168,85,247,0.45); } 70% { box-shadow: 0 0 0 10px rgba(168,85,247,0); } 100% { box-shadow: 0 0 0 0 rgba(168,85,247,0); } }

.container { max-width: 1200px; margin: 0 auto; padding: 60px 20px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.card { background: var(--card-bg); border: 1px solid var(--border-color); padding: 32px; border-radius: 16px; box-shadow: 0 0 25px rgba(168, 85, 247, 0.08); }
.news-date { font-size: 0.85rem; color: var(--accent-light); font-family: 'JetBrains Mono', monospace; margin-bottom: 10px; display: block; }

/* === UKŁAD PANELU ADMINA === */
.admin-layout { display: flex; height: 100vh; overflow: hidden; }
.admin-sidebar { width: 280px; background: #09090f; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; padding: 20px; }
.admin-sidebar-logo { font-size: 1.5rem; font-weight: 800; margin-bottom: 40px; padding-left: 10px; display: flex; align-items: center; justify-content: space-between; }
.admin-nav { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.admin-nav-item { width: 100%; text-align: left; padding: 12px 16px; border-radius: 8px; font-weight: 500; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 12px; transition: 0.2s; }
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(168, 85, 247, 0.12); color: var(--accent-light); }
.admin-main { flex: 1; display: flex; flex-direction: column; background: var(--bg-color); overflow-y: auto; }
.admin-header { height: 70px; border-bottom: 1px solid var(--border-color); background: #0d0d15; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; position: sticky; top: 0; z-index: 10; }
.admin-content-area { padding: 30px; max-width: 1400px; margin: 0 auto; width: 100%; }

/* Tabele Admina */
.admin-table-wrapper { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; margin-top: 20px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: #0b0b12; padding: 16px; text-align: left; font-size: 0.85rem; text-transform: uppercase; color: var(--accent-light); border-bottom: 1px solid var(--border-color); }
.admin-table td { padding: 16px; border-bottom: 1px solid rgba(168, 85, 247, 0.12); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }

.badge { padding: 4px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.badge-admin { background: rgba(168, 85, 247, 0.14); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.35); }
.badge-mod { background: rgba(124, 58, 237, 0.14); color: #a78bfa; border: 1px solid rgba(124, 58, 237, 0.35); }
.badge-helper { background: rgba(192, 132, 252, 0.12); color: #d8b4fe; border: 1px solid rgba(192, 132, 252, 0.32); }

/* Konsola Live */
.console-box { background: var(--console-bg); border-radius: 12px; border: 1px solid var(--border-color); height: 500px; display: flex; flex-direction: column; overflow: hidden; font-family: 'JetBrains Mono', monospace; box-shadow: 0 0 25px rgba(168, 85, 247, 0.1); }
.console-output { flex: 1; padding: 20px; overflow-y: auto; color: #a1a1aa; font-size: 0.9rem; line-height: 1.5; }
.console-line-time { color: #71717a; margin-right: 10px; }
.console-line-info { color: #a78bfa; }
.console-line-warn { color: #c084fc; }
.console-input-area { display: flex; border-top: 1px solid rgba(168, 85, 247, 0.25); background: #0b0b12; }
.console-input-area span { padding: 15px 0 15px 20px; color: var(--accent-light); font-weight: bold; }
.console-input { flex: 1; background: transparent; border: none; color: white; padding: 15px; font-family: 'JetBrains Mono', monospace; outline: none; font-size: 0.9rem; }