/* c:\discord\discord\css\style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Ultra Premium Dark Aesthetic Palettes */
  --bg-primary: #0A0A0C;
  --bg-secondary: #0F1115;
  --bg-tertiary: #14151B;
  --bg-quaternary: #1A1C23;
  
  --brand-solid: #5865F2;
  --brand-glow: rgba(88, 101, 242, 0.4);
  --brand-gradient: linear-gradient(135deg, #5865F2 0%, #7983F5 100%);
  --brand-gradient-hover: linear-gradient(135deg, #4752C4 0%, #5865F2 100%);
  
  --success-solid: #23A559;
  --success-gradient: linear-gradient(135deg, #23A559 0%, #2ECC71 100%);
  --danger-solid: #DA373C;
  --danger-gradient: linear-gradient(135deg, #DA373C 0%, #FF4757 100%);
  
  --text-main: #FFFFFF;
  --text-muted: #949BA4;
  
  /* Perfect Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  filter: saturate(var(--saturation-factor, 1));
}

h1, h2, h3, h4, h5, h6, .font-bold {
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.3px;
  font-weight: 700;
}

/* Base Tailwind Overrides for Sleekness */
.bg-discord-100 { background-color: var(--bg-primary) !important; }
.bg-discord-200 { background-color: var(--bg-secondary) !important; }
.bg-discord-300 { background-color: var(--bg-tertiary) !important; }
.bg-discord-400 { background-color: rgba(255,255,255,0.03) !important; border: 1px solid rgba(255,255,255,0.03); }
.text-discord-muted { color: var(--text-muted) !important; }

/* Global Entrance Animations */
@keyframes slideUpFade {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes scaleInFade {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

/* Modals & Login Panel - The Glassmorphism Masterpiece */
#login-screen {
  background: radial-gradient(circle at 0% 0%, rgba(88,101,242,0.15) 0%, transparent 60%),
              radial-gradient(circle at 100% 100%, rgba(35,165,89,0.1) 0%, transparent 60%) !important;
  background-color: var(--bg-primary) !important;
}

#login-screen > div {
  background: rgba(18, 20, 25, 0.6) !important;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9), inset 0 2px 0 rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Inputs - Interactive Neumorphic Feel */
input[type="text"], input[type="password"] {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.5) !important;
  border-radius: var(--radius-md) !important;
  padding: 14px 18px !important;
  font-size: 15px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

input[type="text"]:focus, input[type="password"]:focus {
  border-color: var(--brand-solid) !important;
  background: rgba(0, 0, 0, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2), inset 0 3px 6px rgba(0,0,0,0.5) !important;
  transform: translateY(-1px);
}

/* Premium Buttons - Dynamic Gradients and Shadows */
button {
  border-radius: var(--radius-sm) !important;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

button::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
button:hover::after { opacity: 1; }

button.bg-discord-brand {
  background: var(--brand-gradient) !important;
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
button.bg-discord-brand:hover {
  background: var(--brand-gradient-hover) !important;
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 30px rgba(88, 101, 242, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}

button.bg-discord-green {
  background: var(--success-gradient) !important;
  box-shadow: 0 6px 20px rgba(35, 165, 89, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
button.bg-discord-green:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 30px rgba(35, 165, 89, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}

button.bg-discord-red {
  background: var(--danger-gradient) !important;
  box-shadow: 0 6px 20px rgba(218, 55, 60, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
button.bg-discord-red:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 30px rgba(218, 55, 60, 0.5);
}

/* Chat Messages Interactions */
.msg-group-container {
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: var(--radius-md) !important;
  border-left: 3px solid transparent;
  animation: slideUpFade 0.4s ease-out forwards;
}

.msg-group-container:hover {
  background: rgba(255, 255, 255, 0.02) !important;
  border-left: 3px solid var(--brand-solid) !important;
  transform: translateX(4px);
  box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}

.msg-text-container span {
  transition: background 0.2s ease, color 0.2s ease;
  line-height: 1.6;
}

/* Perfect Corners Applied Globally */
.rounded-xl, .rounded-2xl { border-radius: var(--radius-xl) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded { border-radius: var(--radius-sm) !important; }

/* Exquisite Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; margin: 4px; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* Left/Right Sidebar List Items - Hover Sweeps */
.friend-item, .group-member-item, #dm-list li, #group-list li {
  margin-bottom: 2px;
  border-radius: var(--radius-md) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border-left: 2px solid transparent;
}

.friend-item:hover, .group-member-item:hover, #dm-list li:hover, #group-list li:hover {
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 0%, transparent 100%) !important;
  border-left: 2px solid var(--brand-solid);
  transform: translateX(3px);
  color: #fff !important;
}

/* Call Overlay and Modals - Deep Glass FX */
#call-overlay {
  background: rgba(10, 11, 14, 0.65) !important;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

#video-grid-container video {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#video-grid-container video:hover {
  transform: scale(1.04);
  box-shadow: 0 25px 50px rgba(0,0,0,0.9), 0 0 30px rgba(88, 101, 242, 0.3);
  border-color: rgba(88, 101, 242, 0.5);
  z-index: 10;
}

#settings-modal > div:last-child {
  background: var(--bg-tertiary);
  box-shadow: -40px 0 80px rgba(0,0,0,0.9);
  border-left: 1px solid rgba(255,255,255,0.04);
}

#create-group-modal > div, #incoming-call-modal {
  background: rgba(22, 24, 30, 0.8) !important;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 35px 80px rgba(0,0,0,0.9);
  border-radius: var(--radius-lg);
  animation: scaleInFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Context Menu Floating Glow */
#context-menu {
  background: rgba(18, 19, 22, 0.85) !important;
  backdrop-filter: blur(35px) saturate(120%);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 20px rgba(88,101,242,0.1);
  border-radius: var(--radius-md) !important;
  padding: 6px;
}

#context-menu div {
  border-radius: var(--radius-xs);
  margin-bottom: 2px;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1) !important;
  font-weight: 500;
}

#context-menu div:hover {
  background: var(--brand-solid) !important;
  color: white !important;
  transform: translateX(4px);
  padding-left: 20px !important; /* Slide arrow effect */
}
#context-menu div.hover\\:bg-discord-red:hover {
  background: var(--danger-solid) !important;
}

/* Voice Connected Banner Breathing Pulse */
#voice-connected-banner {
  background: linear-gradient(90deg, rgba(35, 165, 89, 0.1) 0%, var(--bg-secondary) 100%);
  border-left: 4px solid var(--success-solid);
  animation: voicePulseBreath 3s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes voicePulseBreath {
  0% { box-shadow: inset 10px 0 20px rgba(35, 165, 89, 0.05); }
  100% { box-shadow: inset 60px 0 80px rgba(35, 165, 89, 0.15); }
}

/* Avatars & Interactive Elements */
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.avatar-img:hover { transform: scale(1.15) rotate(2deg); }

/* Custom Tab Buttons */
#tab-btn-login, #tab-btn-register {
  transition: all 0.3s ease;
}
#tab-btn-login.border-discord-brand, #tab-btn-register.border-discord-brand {
  border-bottom-width: 3px;
  color: #fff;
  text-shadow: 0 0 10px rgba(88,101,242,0.5);
}

/* === DISCORD TARZI INLINE AUDIO PLAYER === */
.audio-player-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #2B2D31;
  border: 1px solid #1E1F22;
  border-radius: 12px;
  padding: 14px 16px;
  max-width: 400px;
  min-width: 320px;
}

.audio-player-icon {
  width: 44px; height: 44px;
  background: rgba(88, 101, 242, 0.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.audio-player-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.audio-player-name {
  color: #00A8FC;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-player-name:hover { text-decoration: underline; }

.audio-player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-play-btn, .audio-vol-btn {
  width: 28px !important; height: 28px !important;
  background: transparent !important;
  border: none !important;
  color: #B5BAC1 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border-radius: 4px !important;
  flex-shrink: 0;
  box-shadow: none !important;
}
.audio-play-btn:hover, .audio-vol-btn:hover { color: #fff !important; }
.audio-play-btn::after, .audio-vol-btn::after { display: none !important; }

.audio-time {
  font-size: 11px;
  color: #949BA4;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 70px;
  font-family: 'Inter', monospace;
}

.audio-progress-wrap {
  flex: 1;
  height: 6px;
  background: #4E5058;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  min-width: 60px;
}

.audio-progress-bar {
  height: 100%;
  background: var(--brand-solid);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* === @MENTION HIGHLIGHT === */
.mention-highlight {
  background: rgba(88, 101, 242, 0.3);
  color: #DEE0FC;
  padding: 0 3px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}
.mention-highlight:hover {
  background: rgba(88, 101, 242, 0.5);
  color: #fff;
}

/* Beni etiketleyen mesaj */
.mention-me {
  background: rgba(250, 168, 26, 0.08) !important;
  border-left: 3px solid #FAA81A !important;
}

/* === OKUNMAMIŞ DM BADGE === */
.dm-unread-badge {
  min-width: 18px;
  height: 18px;
  background: var(--danger-solid);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}

/* === SUNUCU BİLDİRİM BADGE === */
.server-unread-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  transition: height 0.2s ease;
}

.server-mention-badge {
  min-width: 16px;
  height: 16px;
  background: var(--danger-solid);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  position: absolute;
  bottom: -2px;
  right: -4px;
  box-shadow: 0 0 0 3px var(--bg-tertiary);
}

/* === ÇEVRİMDIŞI ÜYE === */
.member-offline {
  opacity: 0.45;
}
.member-offline .avatar-img,
.member-offline img {
  filter: grayscale(100%);
}

/* === TEMA DEĞİŞKENLERİ === */
[data-theme="light"] {
  --bg-primary: #F2F3F5;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #E3E5E8;
  --bg-quaternary: #EBEDEF;
  --text-main: #060607;
  --text-muted: #4E5058;
}

[data-theme="midnight"] {
  --bg-primary: #000000;
  --bg-secondary: #0A0A0C;
  --bg-tertiary: #0E0E10;
  --bg-quaternary: #111113;
  --text-main: #DBDEE1;
  --text-muted: #949BA4;
}

/* === AZALTILMIŞ HAREKET === */
.reduce-motion * {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}

/* === YÜKSEK KONTRAST === */
.high-contrast {
  --text-main: #FFFFFF !important;
  --text-muted: #C0C4CB !important;
}
.high-contrast .bg-discord-200,
.high-contrast .bg-discord-300,
.high-contrast .bg-discord-400 {
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}
.high-contrast input,
.high-contrast textarea,
.high-contrast select {
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}
.high-contrast .text-discord-muted {
  color: #C0C4CB !important;
}
.high-contrast .msg-group-container:hover {
  border-left: 3px solid #FFFFFF !important;
}

/* === SOHBET FONT BOYUTU === */
.msg-text-container {
  font-size: var(--chat-font-size, 16px);
}

/* === AYARLAR RENK SEÇİCİ === */
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  padding: 0;
}
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 50%;
}
input[type="color"]::-webkit-color-swatch {
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
}

/* === AYARLAR SELECT === */
#settings-modal select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23949BA4' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* === AYARLAR RANGE SLIDER === */
#settings-modal input[type="range"] {
  height: 6px;
  background: #1E1F22;
  border-radius: 3px;
  -webkit-appearance: none;
  appearance: none;
}
#settings-modal input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* === KBD STİLİ === */
kbd {
  font-family: 'SFMono-Regular', Consolas, monospace;
  box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}