/* ==========================================================================
   InstaÇekiliş — Modern Glassmorphic Dark UI & Motion Stylesheet
   ========================================================================== */

:root {
  --bg-dark: #0b0f19;
  --bg-card: rgba(21, 28, 44, 0.65);
  --bg-card-hover: rgba(28, 37, 58, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 59, 112, 0.3);
  
  --primary-pink: #ff3b70;
  --primary-purple: #8a2be2;
  --gradient-insta: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --gradient-primary: linear-gradient(135deg, #ff3b70 0%, #8a2be2 100%);
  --gradient-gold: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  --gradient-cyan: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --accent-gold: #ffd700;
  --accent-cyan: #38bdf8;
  --accent-green: #34d399;
  --accent-red: #f87171;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-glow: 0 10px 30px rgba(255, 59, 112, 0.15);
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Animated Glowing Background Blobs */
.background-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  animation: floatBlob 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 450px;
  height: 450px;
  background: var(--primary-pink);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 550px;
  height: 550px;
  background: var(--primary-purple);
  bottom: -150px;
  right: -100px;
  animation-delay: -5s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: #3b82f6;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -10s;
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 1100px;
  padding: 24px 20px 60px;
  position: relative;
  z-index: 1;
}

/* Main Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.logo-icon i {
  width: 28px;
  height: 28px;
  color: #fff;
}

.logo-text h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.logo-text h1 span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.header-badges {
  display: flex;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.badge i {
  width: 14px;
  height: 14px;
}

.badge-purple {
  background: rgba(138, 43, 226, 0.15);
  color: #c084fc;
  border-color: rgba(138, 43, 226, 0.3);
}

.badge-pink {
  background: rgba(255, 59, 112, 0.15);
  color: #f472b6;
  border-color: rgba(255, 59, 112, 0.3);
}

/* Config Section Grid */
.config-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 868px) {
  .config-section {
    grid-template-columns: 1fr;
  }
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gradient-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 59, 112, 0.3);
}

.card-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

/* Input Tabs */
.tab-buttons {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn i {
  width: 16px;
  height: 16px;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-pane {
  display: none;
}

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

/* Input Fields */
.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.sub-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

textarea#comments-input {
  width: 100%;
  height: 175px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--text-main);
  font-family: monospace, var(--font-main);
  font-size: 0.875rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea#comments-input:focus {
  border-color: var(--primary-pink);
  box-shadow: 0 0 0 3px rgba(255, 59, 112, 0.15);
}

.quick-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* URL Box */
.url-input-box {
  display: flex;
  gap: 8px;
}

.url-input-box input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #fff;
  font-size: 0.875rem;
  outline: none;
}

.url-input-box input:focus {
  border-color: var(--primary-pink);
}

.info-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.8rem;
  color: #93c5fd;
  margin-top: 14px;
  line-height: 1.4;
}

.info-alert i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* File Dropzone */
.file-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.2);
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--primary-pink);
  background: rgba(255, 59, 112, 0.05);
}

.dropzone-icon {
  width: 42px;
  height: 42px;
  color: var(--primary-pink);
  margin-bottom: 12px;
}

.dropzone-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.dropzone-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: #6ee7b7;
  margin-top: 14px;
}

.file-info.hidden { display: none; }

.file-info button {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

/* Stats Banner */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 18px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

/* Rules Grid */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.rule-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.rule-box label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.rule-box label i { width: 16px; height: 16px; color: var(--primary-pink); }

.stepper {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.step-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.step-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.stepper input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  outline: none;
}

/* Filters List */
.filter-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  gap: 12px;
}

.filter-info {
  display: flex;
  flex-direction: column;
}

.filter-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.filter-title i { width: 16px; height: 16px; color: var(--accent-cyan); }
.highlight-title i { color: var(--accent-gold); }

.filter-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Custom Select & Input */
.custom-select, .custom-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 8px 12px;
  font-size: 0.8rem;
  outline: none;
}

.custom-select:focus, .custom-input:focus {
  border-color: var(--primary-pink);
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}

input:checked + .slider {
  background: var(--gradient-primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Notice Box for Post Save */
.save-notice-box {
  display: flex;
  gap: 12px;
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.notice-icon i {
  width: 20px;
  height: 20px;
  color: var(--accent-gold);
}

.notice-content {
  font-size: 0.775rem;
  line-height: 1.45;
  color: #fde68a;
}

.notice-content strong {
  display: block;
  margin-bottom: 2px;
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.btn-gradient {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 8px 25px rgba(255, 59, 112, 0.35);
}

.btn-gradient:hover {
  transform: translateY(-2deg);
  box-shadow: 0 12px 30px rgba(255, 59, 112, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary-pink);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--accent-red);
}

/* Draw Section Animation */
.draw-section {
  margin-bottom: 32px;
}

.draw-section.hidden { display: none; }

.card-drawing {
  text-align: center;
  padding: 40px 20px;
}

.drawing-header {
  margin-bottom: 24px;
}

.pulse-dot {
  width: 16px;
  height: 16px;
  background: var(--primary-pink);
  border-radius: 50%;
  margin: 0 auto 12px;
  box-shadow: 0 0 0 rgba(255, 59, 112, 0.6);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 112, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(255, 59, 112, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 112, 0); }
}

.slot-machine-box {
  width: 100%;
  max-width: 480px;
  height: 90px;
  margin: 0 auto 24px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--primary-pink);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(255, 59, 112, 0.3);
}

.slot-reel {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-item {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.progress-bar-container {
  width: 100%;
  max-width: 480px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin: 0 auto;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.1s linear;
}

/* Results Section */
.results-section.hidden { display: none; }

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.results-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trophy-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.trophy-badge i { width: 26px; height: 26px; color: #000; }

.results-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.results-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .results-grid { grid-template-columns: 1fr; }
}

.block-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.block-asil .block-header h3 i { color: var(--accent-gold); }
.block-yedek .block-header h3 i { color: var(--accent-cyan); }

.winners-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Winner Card */
.winner-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.winner-card:hover {
  transform: translateY(-2deg);
}

.card-asil {
  border-left: 4px solid var(--accent-gold);
}

.card-yedek {
  border-left: 4px solid var(--accent-cyan);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-asil { background: var(--gradient-gold); color: #000; }
.rank-yedek { background: var(--gradient-cyan); color: #000; }

.winner-user {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.winner-comment {
  font-size: 0.825rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-style: italic;
  word-break: break-word;
}

.winner-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}

.mini-badge {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.mini-badge-check {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

/* Verification Checkboxes on Card */
.save-check-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.725rem;
  color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: auto;
}

/* Verification Summary */
.verification-summary {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.verification-summary h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
}

.summary-details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-item i { color: var(--accent-green); width: 14px; height: 14px; }

/* Main Footer */
.main-footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.825rem;
  color: var(--text-dim);
}

.main-footer strong { color: var(--text-muted); }
