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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #000;
  color: #333;
  line-height: 1.6;
}

/* ============ ANA SAYFA ============ */
header {
  background: #000;
  color: white;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(
    90deg,
    #c0c0c0 0%,
    #e8e8e8 25%,
    #ffffff 50%,
    #e8e8e8 75%,
    #c0c0c0 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

header .header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

header .header-right a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

header .header-right a:hover {
  color: #fff;
}

/* Kategori Nav */
.kategori-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: #111;
}

.kategori-tab {
  padding: 10px 20px;
  background: #222;
  color: #aaa;
  text-decoration: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid #333;
}

.kategori-tab:hover {
  background: #333;
  color: #fff;
}

.kategori-tab.active {
  background: linear-gradient(135deg, #ffd700, #daa520);
  color: #000;
  border-color: transparent;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: #000;
  min-height: 100vh;
}

.ilan-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ilan-card {
  display: block;
  text-decoration: none;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
  height: 140px;
  background: #333;
}

.ilan-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.ilan-foto {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: left center;
  animation: slideCollage 30s linear infinite;
}

@keyframes slideCollage {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.no-foto {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  background: #eee;
}

/* Sol taraf gradient overlay */
.ilan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 350px;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
  z-index: 1;
}

/* Gradient varyasyonları */
.ilan-card.gradient-1::before {
  background: linear-gradient(to right, rgba(75,0,130,0.9) 0%, rgba(75,0,130,0.5) 50%, transparent 100%);
}
.ilan-card.gradient-2::before {
  background: linear-gradient(to right, rgba(139,69,19,0.9) 0%, rgba(184,134,11,0.5) 50%, transparent 100%);
}
.ilan-card.gradient-3::before {
  background: linear-gradient(to right, rgba(128,0,0,0.9) 0%, rgba(128,0,0,0.5) 50%, transparent 100%);
}
.ilan-card.gradient-4::before {
  background: linear-gradient(to right, rgba(0,100,0,0.9) 0%, rgba(0,100,0,0.5) 50%, transparent 100%);
}
.ilan-card.gradient-5::before {
  background: linear-gradient(to right, rgba(0,0,139,0.9) 0%, rgba(0,0,139,0.5) 50%, transparent 100%);
}
.ilan-card.gradient-6::before {
  background: linear-gradient(to right, rgba(85,26,139,0.9) 0%, rgba(147,112,219,0.5) 50%, transparent 100%);
}
.ilan-card.gradient-7::before {
  background: linear-gradient(to right, rgba(184,134,11,0.9) 0%, rgba(218,165,32,0.5) 50%, transparent 100%);
}
.ilan-card.gradient-8::before {
  background: linear-gradient(to right, rgba(47,79,79,0.9) 0%, rgba(47,79,79,0.5) 50%, transparent 100%);
}
.ilan-card.gradient-9::before {
  background: linear-gradient(to right, rgba(139,0,0,0.9) 0%, rgba(220,20,60,0.5) 50%, transparent 100%);
}
.ilan-card.gradient-10::before {
  background: linear-gradient(to right, rgba(72,61,139,0.9) 0%, rgba(123,104,238,0.5) 50%, transparent 100%);
}

.ilan-info {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  padding: 25px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
  max-width: 400px;
}

.ilan-info h3 {
  margin-bottom: 10px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.ilan-info p {
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.card-alt-aciklamalar {
  list-style: none;
  margin: 0;
  padding: 0;
}

.card-alt-aciklamalar li {
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.empty {
  text-align: center;
  color: #999;
  padding: 40px;
  grid-column: 1 / -1;
}

/* ============ MODAL ============ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow-y: auto;
  position: relative;
  padding: 0;
  animation: modalSlideIn 0.2s ease-out;
}

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

.modal-content h2 {
  padding: 20px 30px;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  border-bottom: 1px solid #e9ecef;
  letter-spacing: -0.3px;
  background: #f8f9fa;
}

.modal-content .admin-form {
  padding: 30px 40px 40px;
  max-width: 700px;
  margin: 0 auto;
}

.modal-content .admin-form .form-group input[type="text"],
.modal-content .admin-form .form-group textarea {
  width: 100%;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  transition: color 0.2s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close:hover {
  color: #1a1a1a;
  background: #f0f0f0;
}

/* İlan Detay */
.ilan-detay .detay-foto {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
}

.ilan-detay h2 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.ilan-detay .aciklama {
  margin-bottom: 20px;
  color: #555;
  white-space: pre-wrap;
}

.alt-aciklamalar {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.alt-aciklamalar li {
  background: #e8f4f8;
  color: #2980b9;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.whatsapp-btn:hover {
  background: #1da851;
}

/* ============ ADMIN PANEL ============ */
.admin-body {
  background: #f8f9fa;
  min-height: 100vh;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.login-box {
  background: white;
  padding: 50px 40px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 380px;
  border: 1px solid #e9ecef;
}

.login-box h2 {
  text-align: center;
  margin-bottom: 35px;
  color: #1a1a1a;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.login-box input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  background: #fafafa;
}

.login-box input:focus {
  outline: none;
  border-color: #1a1a1a;
  background: white;
}

.login-box button {
  width: 100%;
  padding: 14px;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.login-box button:hover {
  background: #333;
}

.error {
  color: #dc3545;
  text-align: center;
  margin-top: 15px;
  font-size: 0.9rem;
}

.admin-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px 20px;
}

header.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 25px;
  border-bottom: 1px solid #e9ecef;
  background: transparent;
  box-shadow: none;
  position: relative;
}

header.admin-header h1 {
  font-size: 1.4rem;
  color: #1a1a1a;
  font-weight: 600;
  letter-spacing: -0.5px;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: #1a1a1a;
  animation: none;
  text-transform: none;
}

.admin-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 0;
}

.tab-btn {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.2s;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: #1a1a1a;
}

.tab-btn.active {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
  background: transparent;
}

.tab-content {
  display: none;
  background: white;
  padding: 30px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

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

.tab-content h2 {
  margin-bottom: 25px;
  color: #1a1a1a;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* Admin Table */
.admin-table table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.admin-table th {
  background: transparent;
  font-weight: 500;
  color: #6c757d;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table tbody tr:hover {
  background: #f8f9fa;
}

.admin-table .thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

/* Drag & Drop Sorting */
.drag-handle {
  cursor: grab;
  color: #aaa;
  font-size: 16px;
  user-select: none;
  padding: 0 8px;
}

.drag-handle:hover {
  color: #666;
}

.drag-handle:active {
  cursor: grabbing;
}

.sortable-ghost {
  background: #e3f2fd !important;
  opacity: 0.8;
}

.sortable-chosen {
  background: #f5f5f5;
}

.admin-table tbody tr {
  transition: background 0.15s;
}

/* Admin Form */
.admin-form .form-group {
  margin-bottom: 24px;
}

.admin-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #1a1a1a;
  font-size: 0.9rem;
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  background: #fafafa;
}

.admin-form input[type="text"]:focus,
.admin-form input[type="password"]:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: #1a1a1a;
  background: white;
}

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

.admin-form input[type="file"] {
  padding: 10px 0;
  font-size: 0.9rem;
}

.preview-img {
  max-width: 180px;
  margin-top: 12px;
  border-radius: 4px;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed #d0d0d0;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
  position: relative;
}

.drop-zone:hover {
  border-color: #999;
  background: #f5f5f5;
}

.drop-zone.drag-over {
  border-color: #1a1a1a;
  background: #f0f0f0;
}

.drop-zone-input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-zone-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #888;
  font-size: 0.9rem;
}

.drop-zone-icon {
  font-size: 2rem;
  color: #bbb;
  line-height: 1;
}

.drop-zone-preview {
  margin-top: 15px;
  position: relative;
  display: inline-block;
}

.drop-zone-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 6px;
  object-fit: contain;
}

.drop-zone-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.2s;
  z-index: 10;
}

.drop-zone-remove:hover {
  background: #c0392b;
}

.drop-zone.has-image .drop-zone-text {
  display: none !important;
}

.drop-zone.has-image {
  padding: 15px;
  border-style: solid;
  border-color: #e0e0e0;
}

.drop-zone.has-image .drop-zone-preview {
  margin-top: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-row textarea {
  min-height: 140px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row .form-group {
    margin-bottom: 20px;
  }
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f5f5f5;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.checkbox-label:hover {
  background: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"]:checked + span,
.checkbox-label:has(input:checked) {
  font-weight: 500;
}

/* Kategori Ekle Form */
.kategori-ekle-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.kategori-ekle-form input {
  flex: 1;
  max-width: 300px;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.95rem;
}

.kategori-ekle-form input:focus {
  outline: none;
  border-color: #1a1a1a;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.btn-primary {
  background: #1a1a1a;
  color: white;
}

.btn-primary:hover {
  background: #333;
}

.btn-secondary {
  background: white;
  color: #1a1a1a;
  border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
  background: #f8f9fa;
  border-color: #ccc;
}

.btn-danger {
  background: white;
  color: #dc3545;
  border: 1px solid #f5c6cb;
}

.btn-danger:hover {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

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

/* Responsive */
@media (max-width: 768px) {
  main {
    padding: 6px 8px;
  }

  .ilan-grid {
    gap: 8px;
  }

  header {
    padding: 10px 12px;
  }

  .admin-header {
    flex-direction: column;
    gap: 15px;
  }

  .admin-nav {
    flex-wrap: wrap;
  }

  .admin-table {
    overflow-x: auto;
  }

  .ilan-card {
    border-radius: 12px;
  }

  .ilan-card::before {
    width: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 70%, transparent 100%);
  }

  .ilan-info {
    max-width: 70%;
    padding: 15px;
  }

  .ilan-info h3 {
    font-size: 0.95rem;
    margin-bottom: 6px;
  }

  .ilan-info p {
    font-size: 0.75rem;
  }

  .card-alt-aciklamalar li {
    font-size: 0.75rem;
    line-height: 1.4;
  }
}
