/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --accent-color: #ff6b35;
    --text-color: #ffffff;
    --text-secondary: #cccccc;
    --background-dark: #0f0f0f;
    --border-color: #444444;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --safe-color: #28a745;
    --euclid-color: #ffc107;
    --keter-color: #dc3545;
    --thaumiel-color: #6f42c1;
    --apollyon-color: #000000;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--primary-color) 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.scp-logo {
    font-size: 4rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px var(--accent-color);
}

.loading-text {
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ff8c42);
    width: 0%;
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Navigation */
.navbar {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scp-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color);
}

.foundation-text {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.nav-menu {
    display: flex;
    gap: 0.1em;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
    background: rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
    border-radius: 25px;
}

.nav-auth {
    position: relative;
}

.auth-btn {
    background: #5865f2;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    background: #ff8c42;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.user-menu {
    position: relative;
    cursor: pointer;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
}

.user-info:hover {
    background: var(--border-color);
}

#user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s ease;
}

.user-dropdown a:hover {
    background: var(--border-color);
}

/* Ukryj hamburger na desktopie */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobilne style */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
  }

  /* Pokaż hamburger */
  .nav-toggle {
    display: block;
  }

  /* Ukryj menu domyślnie */
  .nav-menu {
    position: absolute;
    top: 60px; /* wysokość navbar */
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 0;
    display: none;
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
  }

  /* Pokaż menu po aktywacji */
  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    padding: 1rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  /* Dostosuj nav-auth */
  .nav-auth {
    margin-top: 0.5rem;
    padding: 0 1rem 1rem;
  }
  .main-content {
  padding-top: 120px; /* równe wysokości navbaru */
}
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    padding: 2rem;
}

.content-section {
    display: none;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

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

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    border-radius: 20px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px var(--accent-color);
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    letter-spacing: 5px;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.classification-banner {
    background: var(--danger-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    display: inline-block;
    font-weight: bold;
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Discord Links */
.discord-links {
    margin-bottom: 3rem;
}

.discord-links h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.discord-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.discord-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.discord-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transition: left 0.5s ease;
}

.discord-card:hover::before {
    left: 100%;
}

.discord-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
}

.discord-card i {
    font-size: 3rem;
    color: #5865f2;
    margin-bottom: 1rem;
}

.discord-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.discord-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.discord-link {
    background: #5865f2;
    color: white;
    padding: 0.7rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.discord-link:hover {
    background: #4752c4;
    transform: translateY(-2px);
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    color: var(--accent-color);
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.primary-btn,
.admin-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn:hover,
.admin-btn:hover {
    background: #ff8c42;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.admin-btn {
    background: var(--warning-color);
    color: var(--primary-color);
}

.admin-btn:hover {
    background: #e0a800;
}

/* Search Bar */
.search-bar {
    position: relative;
    margin-bottom: 2rem;
    max-width: 500px;
}

.search-bar input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.search-bar i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* Serials Grid */
.serials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.serial-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.serial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--safe-color);
}

.serial-card.euclid::before { background: var(--euclid-color); }
.serial-card.keter::before { background: var(--keter-color); }
.serial-card.thaumiel::before { background: var(--thaumiel-color); }
.serial-card.apollyon::before { background: var(--apollyon-color); }

.serial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.serial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.serial-number {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-color);
}

.serial-class {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.serial-class.safe { background: var(--safe-color); color: white; }
.serial-class.euclid { background: var(--euclid-color); color: var(--primary-color); }
.serial-class.keter { background: var(--keter-color); color: white; }
.serial-class.thaumiel { background: var(--thaumiel-color); color: white; }
.serial-class.apollyon { background: var(--apollyon-color); color: white; border: 1px solid white; }

.serial-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.serial-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.serial-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.serial-link:hover {
    color: #ff8c42;
}

/* Stories */
.stories-filter {
    margin-bottom: 2rem;
}

.stories-filter select {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
}

.stories-list {
    display: grid;
    gap: 1.5rem;
}

.story-card {
  border: 1px solid #444;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 15px;
  background-color: #222;
  color: #eee;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.story-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
}

.story-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.story-title {
  flex: 2;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-class-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 180px;
}

.story-author {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.story-actions {
  display: flex;
  justify-content: center; /* wyśrodkowanie przycisku */
  gap: 12px;
}
.read-more-btn {
  background-color: #ff6b35;
  color: white;
  border: none;
  padding: 8px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 140px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff6b35;
}

.author-name {
  font-weight: 600;
  color: #ff6b35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-category {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    background: var(--accent-color);
    color: white;
}

.story-summary {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.story-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.story-link:hover {
    color: #ff8c42;
}

/* Characters */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.character-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.character-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

/* Tło modala - półprzezroczyste, na całą stronę */
#character-info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  box-sizing: border-box;
}

/* Pokaż modal */
#character-info-modal.show {
  display: flex;
}

/* Kontener modala */
#character-info-container {
  background: var(--background-color, #2d2d2d);
  color: var(--text-color, #222);
  border-radius: 12px;
  max-width: 880px;
  width: 100%;
  padding: 2rem 2.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-y: auto;
  max-height: 90vh;
  position: relative;
}

/* Nagłówek */
#character-info-container h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  text-align: center;
  color: var(--accent-color, #007acc);
}

#character-info-modal a {
  color: white !important;
  text-decoration: none !important;
  font-weight: bold !important;
}
/* Avatar */
.character-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem auto;
  background: var(--accent-color, #007acc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
  border: 3px solid var(--accent-color, #007acc);
}

.character-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Tekst info */
.character-info p {
  margin: 0.4rem 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.character-info p strong {
  color: var(--accent-color, #007acc);
}

/* Historia i logi */
.character-info p + p {
  margin-top: 1rem;
}

.character-info ul {
  list-style: inside disc;
  padding-left: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  max-height: 150px;
  overflow-y: auto;
  border-left: 3px solid var(--accent-color, #007acc);
  color: var(--text-secondary, #555);
  font-size: 0.95rem;
}

/* Przycisk zamknięcia */
#close-character-info-btn {
  display: block;
  margin: 1.5rem auto 0 auto;
  padding: 0.6rem 1.8rem;
  background-color: var(--accent-color, #007acc);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

#close-character-info-btn:hover {
  background-color: #005fa3;
}

/* Scrollbar dla logów (opcjonalnie) */
.character-info ul::-webkit-scrollbar {
  width: 6px;
}

.character-info ul::-webkit-scrollbar-thumb {
  background-color: var(--accent-color, #007acc);
  border-radius: 3px;
}
/* Departments */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.department-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.department-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.department-icon {
    text-align: center;
    margin-bottom: 1rem;
}

.department-icon i {
    font-size: 3rem;
    color: var(--accent-color);
}

.department-card h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.department-hierarchy {
    margin-bottom: 1.5rem;
}

.rank {
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--primary-color);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    color: var(--text-color);
    font-size: 0.9rem;
}

.department-personnel {
    max-height: 200px;
    overflow-y: auto;
}

.personnel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--primary-color);
    border-radius: 8px;
}

.personnel-name {
    color: var(--text-color);
}

.personnel-rank {
    color: var(--accent-color);
    font-size: 0.8rem;
}

/* Forum */
.forum-container {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    height: 600px;
    display: flex;
    flex-direction: column;
}

.forum-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.forum-controls select {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    color: var(--text-color);
    cursor: pointer;
}

.forum-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    border-bottom: 1px solid var(--border-color);
}

.forum-message {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--primary-color);
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.message-author {
    font-weight: bold;
    color: var(--accent-color);
}

.message-character {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.message-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.message-content {
    color: var(--text-color);
    line-height: 1.5;
}

.message-image {
    max-width: 300px;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.forum-input {
    padding: 1rem;
}

.input-header {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.input-container {
    display: flex;
    gap: 0.5rem;
}

#forum-message-input {
    flex: 1;
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.7rem;
    color: var(--text-color);
    resize: vertical;
    min-height: 60px;
}

#forum-message-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.input-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-btn,
.send-btn {
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    padding: 0.7rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover,
.send-btn:hover {
    background: #ff8c42;
}

.action-btn:disabled,
.send-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

/* FAQ */
.faq-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
}

.faq-sidebar {
    background: var(--primary-color);
    padding: 1rem 0;
}

.faq-category {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.faq-category:hover,
.faq-category.active {
    background: var(--secondary-color);
    color: var(--accent-color);
    border-right: 3px solid var(--accent-color);
}

.faq-content {
    padding: 2rem;
    max-height: 600px;
    overflow-y: auto;
}

.faq-section-content {
    display: none;
}

.faq-section-content.active {
    display: block;
}

.faq-item,
.guideline-item,
.example-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--primary-color);
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.faq-item h4,
.guideline-item h4,
.example-item h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.template-card {
    background: var(--primary-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.template-card h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.template-card pre {
    background: var(--background-dark);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.template-card code {
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

.copy-template {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.copy-template:hover {
    background: #ff8c42;
}

.good-example {
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid var(--success-color);
    padding: 1rem;
    border-radius: 5px;
}

.bad-example {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid var(--danger-color);
    padding: 1rem;
    border-radius: 5px;
}

/* Changelog */
.changelog-container {
    max-height: 600px;
    overflow-y: auto;
}

.changelog-entry {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 3rem;
}

.changelog-entry::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
}

.changelog-entry.added::before { background: var(--success-color); }
.changelog-entry.changed::before { background: var(--warning-color); }
.changelog-entry.fixed::before { background: var(--success-color); }
.changelog-entry.removed::before { background: var(--danger-color); }

.changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.changelog-type {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.changelog-type.added { background: var(--success-color); color: white; }
.changelog-type.changed { background: var(--warning-color); color: var(--primary-color); }
.changelog-type.fixed { background: var(--success-color); color: white; }
.changelog-type.removed { background: var(--danger-color); color: white; }

.changelog-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.changelog-title {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.changelog-description {
    color: var(--text-secondary);
    line-height: 1.5;
}

.changelog-server {
    color: white;
    font-size: 0.9rem;
    margin-left: 1rem;
    padding: 0.1rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--accent-color);
    user-select: none;
    white-space: nowrap;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-delete-modal {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-delete-modal:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-delete-modal:active {
    transform: translateY(0);
}

.btn-delete-modal i {
    font-size: 12px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.modal-content.large {
    max-width: 800px;
}

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

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--accent-color);
}

.modal h3 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal input,
.modal select,
.modal textarea {
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.7rem;
    color: var(--text-color);
    font-size: 1rem;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.modal textarea {
    min-height: 100px;
    resize: vertical;
}

.modal button[type="submit"] {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.modal button[type="submit"]:hover {
    background: #ff8c42;
}

/* Footer */
.footer {
    background: var(--primary-color);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-section a i {
    margin-right: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 1rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-accent {
    color: var(--accent-color);
}

.text-secondary {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-menu {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .main-content {
        padding: 1rem;
        margin-top: 300px;
    }

    .discord-grid,
    .serials-grid,
    .characters-grid {
        grid-template-columns: 1fr;
    }

    .departments-grid {
        grid-template-columns: 1fr;
    }

    .faq-container {
        grid-template-columns: 1fr;
    }

    .faq-sidebar {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
    }

    .faq-category {
        white-space: nowrap;
        padding: 0.5rem 1rem;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .classification-banner {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .stat-number {
        font-size: 2rem;
    }


    .input-container {
        flex-direction: column;
    }

    .input-actions {
        flex-direction: row;
        justify-content: flex-end;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

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

/* Selection Styling */
::selection {
    background: var(--accent-color);
    color: white;
}

::-moz-selection {
    background: var(--accent-color);
    color: white;
}

.discord-server-icon {
    width: 64px;
    height: 64px;
    border-radius: 15px;
    margin-bottom: 1rem;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Profile Section */
#profile-section {
  padding: 20px;
}

.profile-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.profile-info {
  flex: 1 1 250px;
  max-width: 300px;
  text-align: center;
}

.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 3px solid #1bbc37; /* zielony akcent */
}

.profile-username {
  font-size: 1.8rem;
  margin-bottom: 5px;
}

#profile-discord-id span {
  font-weight: bold;
}

.profile-content {
  flex: 3 1 600px;
}

.profile-section-block {
  margin-bottom: 30px;
}

.profile-section-block h4 {
  border-bottom: 2px solid #1bbc37;
  padding-bottom: 5px;
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.profile-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.profile-list > div {
  background: #222;
  padding: 15px;
  border-radius: 8px;
  flex: 1 1 250px;
  box-shadow: 0 0 8px rgba(27, 188, 55, 0.5);
}

.profile-list h5 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
}

.profile-list p {
  font-size: 0.9rem;
  color: #ccc;
}

.profile-list a {
  color: #1bbc37;
  text-decoration: none;
  font-weight: bold;
}

.profile-list a:hover {
  text-decoration: underline;
}

#story-detail-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
  /* Zapobiega poziomemu scrollowi */
  overflow-x: hidden;
}

/* Upewnij się, że element z treścią nie ma szerokości większej niż kontener */
#story-content {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap; /* zachowuje łamanie linii */
}

/* Dodatkowo, jeśli masz jakieś elementy typu <img>, <pre>, <code> itp. */
#story-content img, 
#story-content pre, 
#story-content code {
  max-width: 100%;
  height: auto;
  display: block;
}

#back-to-list-btn {
  background-color: #ff6b35;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 25px;
  transition: background-color 0.3s ease;
  display: inline-block;
}

#back-to-list-btn:hover {
  background-color: #e05a1f;
}

#story-details-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0 0 8px;
  text-align: center;
  color: #ff6b35;
}

#story-details-author {
  font-size: 1.1rem;
  font-style: italic;
  text-align: center;
  margin: 0 0 30px;
  color: #ccc;
}

#story-content textarea#story-edit-textarea {
  width: 100%;
  height: 300px;
  padding: 10px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  box-sizing: border-box;
}

#story-content button#save-content-btn,
#story-content button#cancel-content-btn {
  margin-right: 10px;
  padding: 8px 16px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#story-content button#save-content-btn {
  background-color: #4caf50;
  color: white;
}

#story-content button#save-content-btn:hover {
  background-color: #45a049;
}

#story-content button#cancel-content-btn {
  background-color: #f44336;
  color: white;
}

#story-content button#cancel-content-btn:hover {
  background-color: #da190b;
}

#edit-author-btn {
  margin-left: 10px;
  padding: 4px 10px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid #007bff;
  background-color: #007bff;
  color: white;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

#edit-author-btn:hover {
  background-color: #0056b3;
}

#serial-detail-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

#close-serial-detail {
  background-color: #ff6b35;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 25px;
  transition: background-color 0.3s ease;
  display: inline-block;
}

#close-serial-detail:hover {
  background-color: #e05a1f;
}

#serial-detail-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0 0 8px;
  text-align: center;
  color: #ff6b35;
}

#serial-detail-class {
  font-size: 1.1rem;
  font-style: italic;
  color: #ccc;
}

#serial-detail-description {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap; /* preserve line breaks */
  margin-top: 15px;
}

/* If you have images, pre, code inside description */
#serial-detail-description img,
#serial-detail-description pre,
#serial-detail-description code {
  max-width: 100%;
  height: auto;
  display: block;
}

.serial-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: #888;
  font-size: 0.9rem;
}

.serial-author img.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
}

.delete-serial-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: #f44336;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.3s ease;
}

.delete-serial-btn:hover {
  background-color: #d32f2f;
}

/* Pole tekstowe do edycji - większe i z możliwością rozciągania w pionie */
#serial-edit-textarea {
  width: 100%;
  min-height: 800px; /* większa wysokość początkowa */
  max-height: 1200px; /* maksymalna wysokość */
  padding: 12px 15px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  border: 2px solid #569cd6;
  border-radius: 8px;
  background-color: #252526;
  color: #d4d4d4;
  resize: vertical; /* pozwala rozciągać tylko w pionie */
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#serial-edit-textarea:focus {
  outline: none;
  border-color: #4fc3f7;
  box-shadow: 0 0 8px #4fc3f7;
}

/* Kontener przycisków */
#serial-edit-controls {
  margin-top: 15px;
  display: flex;
  gap: 12px;
  justify-content: flex-start;
}

/* Przycisk Edytuj opis */
#edit-author-btn,
button#edit-description-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#edit-author-btn:hover,
button#edit-description-btn:hover {
  background-color: #0056b3;
}

/* Przycisk Zapisz */
#serial-edit-controls button#save-content-btn {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#serial-edit-controls button#save-content-btn:hover {
  background-color: #45a049;
}

/* Przycisk Anuluj */
#serial-edit-controls button#cancel-content-btn {
  background-color: #f44336;
  color: white;
  border: none;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#serial-edit-controls button#cancel-content-btn:hover {
  background-color: #da190b;
}

.delete-forum-message-btn {
  font-size: 18px;
  line-height: 1;
  padding: 0 6px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.delete-forum-message-btn:hover {
  background-color: rgba(255, 0, 0, 0.1);
}

.forum-message-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover; /* przytnie obraz, jeśli proporcje się nie zgadzają */
    border-radius: 50%; /* okrągły avatar */
    display: block;
}
.character-search {
    position: relative;
    margin-bottom: 2rem;
    max-width: 500px;
}

.character-search input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    background: #000000; /* czarne tło */
    border: 2px solid #ffffff; /* biała ramka */
    border-radius: 25px;
    color: #ffffff; /* biały tekst */
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.character-search input::placeholder {
    color: #cccccc; /* jaśniejszy placeholder */
}

.character-search input:focus {
    outline: none;
    border-color: #ff6b35; /* pomarańczowy akcent */
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.character-search i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bbbbbb;
    pointer-events: none; /* żeby ikona nie przeszkadzała w klikaniu */
}