/* CSS Variables for Theme Support */
:root {
  /* Light Theme Colors */
  --primary-color: #6b7280;
  --primary-hover: #4b5563;
  --secondary-color: #6c757d;
  --background-color: #f9f9f9;
  --surface-color: #ffffff;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #adb5bd;
  --border-color: #dcdfe4;
  --border-light: #e9ecef;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.12);
  --success-color: #34d399;
  --danger-color: #f87171;
  --warning-color: #fbbf24;
  --info-color: #38bdf8;
  --accent-color: #6b7280;

  /* Header Colors */
  --header-bg: #ffffff;
  --header-text: #212529;

  /* Card Colors */
  --card-bg: #ffffff;
  --card-border: #dcdfe4;
  --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);

  /* Input Colors */
  --input-bg: #ffffff;
  --input-border: #ced4da;
  --input-focus: #6b7280;
  --input-text: #212529;

  /* Button Colors */
  --btn-primary-bg: #f8f9fa;
  --btn-primary-text: #495057;
  --btn-primary-hover: #e9ecef;
  --btn-secondary-bg: #f1f3f4;
  --btn-secondary-text: #5f6368;
  --btn-secondary-hover: #e8eaed;

  /* Footer Colors */
  --footer-text: #6c757d;
  --footer-border: #dcdfe4;

  /* Item Colors */
  --item-bg: #f8f9fa;
  --item-hover-bg: #e9ecef;

  /* Emoji Sidebar Colors */
  --emoji-sidebar-bg: rgba(24, 24, 24, 0.98);
  --emoji-sidebar-text: #fff;
  --emoji-sidebar-hover-bg: #23272f;
  --emoji-sidebar-hover-text: #ffd700;
}


/* Dark Theme Colors */
.dark {
  --primary-color: #9ca3af;
  --primary-hover: #6b7280;
  --secondary-color: #9ea7b3;
  --background-color: #121212;
  --surface-color: #1e1e1e;
  --text-primary: #f1f3f5;
  --text-secondary: #adb5bd;
  --text-muted: #7f8489;
  --border-color: #232527;
  --border-light: #3a3f44;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --shadow-hover: rgba(0, 0, 0, 0.6);
  --success-color: #4ade80;
  --danger-color: #f87171;
  --warning-color: #facc15;
  --info-color: #38bdf8;
  --accent-color: #9ca3af;

  /* Header Colors */
  --header-bg: #1a1a1a;
  --header-text: #f1f3f5;

  /* Card Colors */
  --card-bg: #1e1e1e;
  --card-border: #2c2f33;
  --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);

  /* Input Colors */
  --input-bg: #1e1e1e;
  --input-border: #3a3f44;
  --input-focus: #9ca3af;
  --input-text: #f1f3f5;

  /* Button Colors */
  --btn-primary-bg: #2d3748;
  --btn-primary-text: #e2e8f0;
  --btn-primary-hover: #4a5568;
  --btn-secondary-bg: #374151;
  --btn-secondary-text: #d1d5db;
  --btn-secondary-hover: #4b5563;

  /* Footer Colors */
  --footer-text: #9ea7b3;
  --footer-border: #2c2f33;

  /* Item Colors */
  --item-bg: #2a2a2a;
  --item-hover-bg: #3a3a3a;

  /* Emoji Sidebar Colors */
  --emoji-sidebar-bg: rgba(24, 24, 24, 0.98);
  --emoji-sidebar-text: #fff;
  --emoji-sidebar-hover-bg: #23272f;
  --emoji-sidebar-hover-text: #ffd700;
}


/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-right: 64px;
}

body, .btn, .card, input, header, .emoji-sidebar, .search-form, .form-control {
  transition: all 0.2s ease-in-out;
}

.top-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.search-form {
  width: 100%;
  max-width: 100%;
  margin: 0 0 2rem 0;
  padding: 2rem 2rem 1.5rem 2rem;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  background: var(--card-bg);
}

.search-form .search-row {
  display: flex;
  flex-direction: row;
  gap: 0;
  width: 100%;
}

.search-form select {
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.search-form input[type="text"] {
  flex: 1 1 0;
  border-radius: 12px 0 0 12px;
  margin: 0;
  border-right: none;
}

.search-form button {
  width: 120px;
  max-width: 120px;
  min-width: 80px;
  flex: none;
  border-radius: 0 12px 12px 0;
  margin: 0;
}

/* Header Styles */
header {
  width: 100%;
  padding: 16px 0; /* 24px → 16px */
  background: var(--header-bg);
  color: var(--header-text);
  text-align: center;
  position: relative;
  box-shadow: 0 2px 8px var(--shadow-color); /* 4px → 8px */
  transition: background-color 0.3s ease, color 0.3s ease;
}

header h1 {
  margin: 0;
  font-size: 2.2rem; /* 2.5rem → 2.2rem */
  letter-spacing: 1.2px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding-left: 80px; /* Sol taraftan biraz boşluk */
}

/* Logo Styles */
.logo {
  width: 80px;
  height: 80px;
  transition: transform 0.3s ease;
  border: 2px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  object-fit: contain;
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Logo container */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Theme Toggle Button */
.theme-toggle {
  position: absolute;
  top: 18px;
  right: 32px;
  background: transparent;
  border: none;
  color: var(--header-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.15) rotate(15deg); /* Mini dönme efekti çok tatlı olur */
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

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

/* Button Styles */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  background: var(--btn-primary-hover);
  color: #2d3748;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-color: var(--border-light);
  text-decoration: none;
}

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

.btn-secondary:hover {
  background: var(--btn-secondary-hover);
  color: #374151;
  text-decoration: none;
}

.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
  text-decoration: none;
}

.btn-success {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #bbf7d0;
}

.btn-success:hover {
  background: #dcfce7;
  color: #15803d;
  text-decoration: none;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Form Styles */
form {
  margin-bottom: 2rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--input-text);
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 14px 18px; /* Biraz daha dolgun görünüm */
  border: 2px solid var(--input-border);
  border-radius: 12px; /* 8px → 12px */
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--input-text);
  transition: all 0.2s ease-in-out;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 4px rgba(0, 122, 204, 0.15);
}

input[type="search"] {
  max-width: 300px;
  margin-right: 1rem;
}

/* Actions Section */
.actions {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--surface-color);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

/* List Styles */
ul {
  list-style: none;
  margin-bottom: 1rem;
}

ul li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

ul li:last-child {
  border-bottom: none;
}

ul ul {
  margin-left: 2rem;
  margin-top: 0.5rem;
}

ul ul li {
  padding: 0.5rem 0;
  border-bottom: none;
}

/* Link Styles */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Card Styles */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px; /* 12px → 16px daha modern */
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all 0.2s ease-in-out;
}

.card:hover {
  box-shadow: 0 8px 16px var(--shadow-hover);
  transform: translateY(-4px);
}


/* Item Detail Styles */
.item-detail-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  line-height: 1.8;
}

.item-detail-box h1,
.item-detail-box h2,
.item-detail-box h3,
.item-detail-box h4,
.item-detail-box h5,
.item-detail-box h6 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.item-detail-box p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.item-detail-box code {
  background: var(--surface-color);
  color: var(--text-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

.item-detail-box pre {
  background: var(--surface-color);
  color: var(--text-primary);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}

/* Login Page Styles */
.login-bg2 {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--surface-color) 0%, var(--background-color) 100%);
}

.login-card2 {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--card-shadow);
}

.text-center {
  text-align: center;
  margin-bottom: 2rem;
}

.login-svg {
  margin-bottom: 1rem;
}

.login-form2 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-input2 {
  width: 100%;
  padding: 10px 40px 10px 16px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--input-text);
  transition: all 0.3s ease;
  position: relative;
  line-height: 1.2;
  height: 42px;
}

.login-input2:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.input-icon {
  position: absolute;
  right: 12px;
  top: 45%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  z-index: 1;
  vertical-align: middle;
}
.login-eye {
  cursor: pointer;
  pointer-events: auto;
}
.login-btn2 {
  width: 100%;
  padding: 14px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.login-btn2:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-hover);
}

/* Error Messages */
#login-error-msg {
  color: var(--danger-color);
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(220, 53, 69, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Footer */
footer {
  text-align: center;
  color: var(--footer-text);
  font-size: 0.95rem;
  margin: 2rem 0 0 0;
  padding: 1rem;
  border-top: 1px solid var(--footer-border);
  transition: color 0.3s ease, border-color 0.3s ease;
}

/* Quill Editor Styles */
.ql-editor {
  background: var(--input-bg);
  color: var(--input-text);
  border: 2px solid var(--input-border);
  border-radius: 8px;
  min-height: 200px;
  transition: all 0.3s ease;
}

.ql-editor:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.ql-toolbar {
  background: var(--surface-color);
  border: 2px solid var(--input-border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

#editor {
  height: 220px;
  margin-bottom: 1rem;
}

/* Quill Editor Dark Theme Support */
.dark .ql-editor {
  background: var(--input-bg);
  color: var(--input-text);
}

.dark .ql-toolbar {
  background: var(--surface-color);
  border-color: var(--input-border);
}

.dark .ql-toolbar .ql-stroke {
  stroke: var(--text-secondary);
}

.dark .ql-toolbar .ql-fill {
  fill: var(--text-secondary);
}

.dark .ql-toolbar .ql-picker {
  color: var(--text-secondary);
}

.dark .ql-toolbar button:hover .ql-stroke,
.dark .ql-toolbar button:focus .ql-stroke {
  stroke: var(--primary-color);
}

.dark .ql-toolbar button:hover .ql-fill,
.dark .ql-toolbar button:focus .ql-fill {
  fill: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  header h1 {
    font-size: 1.8rem;
  }
  
  .logo {
    width: 65px;
    height: 65px;
  }
  
  .theme-toggle {
    top: 12px;
    right: 16px;
  }
  
  .login-card2 {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  input[type="search"] {
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }
  
  .logo {
    width: 55px;
    height: 55px;
  }
  
  .container {
    padding: 0.5rem;
  }
  
  .login-card2 {
    margin: 0.5rem;
    padding: 1rem;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Dark Theme Button Hover Colors */
.dark .btn:hover {
  color: #f3f4f6;
}

.dark .btn-secondary:hover {
  color: #e5e7eb;
}

.alert {
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.3s;
}

.alert-error {
  color: var(--danger-color);
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.18);
}

.alert-success {
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.dark .alert-error {
  color: #f87171;
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.28);
}

.dark .alert-success {
  background-color: rgba(74, 222, 128, 0.1);
  border-color: var(--success-color);
  color: var(--success-color);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.form-actions .btn {
  flex: 1;
  min-width: 150px;
}

/* File Info Box */
.file-info-box {
  background: var(--item-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
}

.file-info-box p {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.file-info-box p:last-child {
  margin-bottom: 0;
}

.file-info-box strong {
  color: var(--text-primary);
  font-weight: 600;
}

.file-info-box .btn {
  margin-top: 1rem;
}

/* Form Labels */
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Responsive Form Actions */
@media (max-width: 768px) {
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn {
    flex: none;
    width: 100%;
  }
  
  .file-info-box {
    padding: 1rem;
  }
}

/* Dashboard Action Buttons Modern Compact Style */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  justify-content: flex-start;
  background: none;
  box-shadow: none;
  padding: 0;
}

.action-buttons .btn {
  min-width: 140px;
  padding: 10px 0.5rem;
  font-size: 1rem;
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--btn-primary-text);
  border: 1.5px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  margin: 0;
  text-align: center;
  transition: all 0.18s;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.action-buttons .btn.btn-danger {
  background: var(--card-bg);
  color: #dc2626;
  border: 1.5px solid #fecaca;
}

.action-buttons .btn.btn-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

@media (max-width: 700px) {
  .action-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  .action-buttons .btn {
    width: 100%;
    min-width: 0;
    font-size: 1rem;
  }
}

/* Emoji Sidebar */
.emoji-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 64px;
  background: var(--emoji-sidebar-bg, rgba(24, 24, 24, 0.98));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 24px 0;
  z-index: 100;
  box-shadow: -2px 0 12px var(--shadow-color);
  gap: 18px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.emoji-sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  border-radius: 50%;
  background: none;
  color: var(--emoji-sidebar-text, #fff);
  margin: 0;
  border: none;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.22s;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
}

.emoji-sidebar-btn:hover {
  background: var(--emoji-sidebar-hover-bg, #23272f);
  color: var(--emoji-sidebar-hover-text, #ffd700);
  box-shadow: 0 4px 16px var(--shadow-hover);
  transform: scale(1.18) rotate(10deg);
}

@media (max-width: 700px) {
  .emoji-sidebar {
    display: none;
  }
}

@media (max-width: 700px) {
  body {
    padding-right: 0;
  }
}

@media (max-width: 700px) {
  .search-form {
    max-width: 100%;
    padding: 1rem 0.5rem 1rem 0.5rem;
  }
  .search-form .search-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  .search-form input[type="text"],
  .search-form button {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border-right: 1px solid var(--input-border);
  }
  .search-form button {
    margin-bottom: 0;
  }
  .top-actions {
    align-items: stretch;
  }
}
