/* Full Stack Developer Hakan Sevim */
:root {
  --d-primary: #0f766e;
  --d-primary-dark: #115e59;
  --d-primary-darker: #134e4a;
  --d-primary-light: #5eead4;
  --d-primary-lighter: #99f6e4;
  --d-primary-soft: #f0fdfa;
  --d-accent: #ca8a04;
  --d-accent-soft: #fef9c3;
  --d-bg: #ffffff;
  --d-bg-soft: #fafefe;
  --d-text: #0f172a;
  --d-text-soft: #475569;
  --d-text-muted: #64748b;
  --d-border: #e2e8f0;
  --d-danger: #dc2626;
  --d-success: #16a34a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--d-text);
  background: var(--d-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(94, 234, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(94, 234, 212, 0.06) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' opacity='0.04'%3E%3Cpath d='M40 8 L52 24 L72 24 L56 38 L64 58 L40 46 L16 58 L24 38 L8 24 L28 24 Z' fill='%230f766e'/%3E%3C/svg%3E");
  background-size: 100% 100%, 100% 100%, 240px 240px;
}

button { font-family: inherit; }

.d-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.d-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--d-border);
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.d-header__logo {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--d-primary), var(--d-primary-darker));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
  position: relative;
  overflow: hidden;
}

.d-header__logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  animation: d-shine 4s ease-in-out infinite;
}

@keyframes d-shine {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.d-header__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.d-header__sub { font-size: 13px; color: var(--d-text-muted); }

.d-main {
  flex: 1;
  padding: 32px 24px;
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.d-welcome {
  text-align: center;
  margin-bottom: 32px;
  animation: d-fade-up 0.6s ease-out;
}

@keyframes d-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.d-welcome__icon {
  width: 110px; height: 110px;
  margin: 0 auto 22px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.d-welcome__icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 18px rgba(15, 118, 110, 0.18));
}

.d-welcome__icon::before {
  content: '';
  position: absolute;
  inset: -8px;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.25) 0%, transparent 60%);
  border-radius: 50%;
  animation: d-glow 3s ease-in-out infinite;
}

@keyframes d-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.08); }
}

.d-welcome__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  background: linear-gradient(135deg, var(--d-primary-darker), var(--d-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.d-welcome__sub {
  font-size: 17px;
  color: var(--d-text-soft);
  margin: 0;
}

.d-form-label {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--d-text);
  margin-bottom: 10px;
  text-align: center;
}

.d-input {
  display: block;
  width: 100%;
  padding: 24px 20px;
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: "SF Mono", Menlo, monospace;
  border: 2px solid var(--d-border);
  border-radius: 18px;
  background: #fff;
  color: var(--d-text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.d-input:focus {
  outline: 0;
  border-color: var(--d-primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15), 0 4px 14px rgba(15, 118, 110, 0.08);
  transform: translateY(-1px);
}

.d-input::placeholder {
  color: #cbd5e1;
  letter-spacing: 0.2em;
}

.d-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 22px 28px;
  font-size: 20px;
  font-weight: 700;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.08s, box-shadow 0.2s;
  min-height: 72px;
  position: relative;
  overflow: hidden;
}

.d-btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.d-btn:active::after {
  width: 300px; height: 300px;
}

.d-btn:active { transform: scale(0.985); }

.d-btn--primary {
  background: linear-gradient(135deg, var(--d-primary), var(--d-primary-dark));
  color: #fff;
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.d-btn--primary:hover {
  box-shadow: 0 8px 28px rgba(15, 118, 110, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.d-btn--primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.d-btn--secondary {
  background: #f1f5f9;
  color: var(--d-text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid var(--d-border);
}

.d-btn--secondary:hover { background: #e2e8f0; }

.d-btn--danger {
  background: linear-gradient(135deg, var(--d-danger), #b91c1c);
  color: #fff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.d-btn--danger:hover { box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45); }

.d-btn__icon { width: 24px; height: 24px; flex-shrink: 0; }

.d-actions { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }

.d-broadcast {
  text-align: center;
  animation: d-fade-up 0.5s ease-out;
}

.d-broadcast__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: var(--d-danger);
  border: 1px solid #fecaca;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}

.d-broadcast__status::before {
  content: '';
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--d-danger);
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6);
  animation: d-pulse-dot 1.6s ease-in-out infinite;
}

@keyframes d-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
  50%      { opacity: 0.4; transform: scale(0.75); box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

.d-broadcast__waiting {
  color: var(--d-text-muted);
  font-size: 16px;
  padding: 16px 22px;
  background: linear-gradient(135deg, var(--d-primary-soft), #ecfdf5);
  border: 1px solid var(--d-primary-lighter);
  border-radius: 14px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.d-broadcast__waiting::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.25), transparent);
  transform: translateX(-100%);
  animation: d-shimmer 2.4s ease-in-out infinite;
}

@keyframes d-shimmer {
  to { transform: translateX(100%); }
}

.d-group-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.d-group-meta {
  font-size: 15px;
  color: var(--d-text-muted);
  margin-bottom: 28px;
}

.d-wave-box {
  width: 240px;
  height: 240px;
  margin: 20px auto 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.d-wave-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--d-primary);
  opacity: 0;
  animation: d-ring 3s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.d-wave-ring:nth-child(1) { animation-delay: 0s; }
.d-wave-ring:nth-child(2) { animation-delay: 0.6s; }
.d-wave-ring:nth-child(3) { animation-delay: 1.2s; }
.d-wave-ring:nth-child(4) { animation-delay: 1.8s; border-color: var(--d-primary-light); }
.d-wave-ring:nth-child(5) { animation-delay: 2.4s; border-color: var(--d-primary-light); }

@keyframes d-ring {
  0%   { transform: scale(0.5); opacity: 0; border-width: 3px; }
  10%  { opacity: 0.9; }
  100% { transform: scale(1.5); opacity: 0; border-width: 1px; }
}

.d-wave-icon {
  width: 124px; height: 124px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--d-primary), var(--d-primary-darker));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  z-index: 1;
  box-shadow:
    0 12px 32px rgba(15, 118, 110, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 8px rgba(0, 0, 0, 0.12);
  position: relative;
  animation: d-breathe 3.2s ease-in-out infinite;
}

.d-wave-icon::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.d-wave-icon svg { width: 64px; height: 64px; }

@keyframes d-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 12px 32px rgba(15, 118, 110, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 8px rgba(0, 0, 0, 0.12);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 18px 44px rgba(15, 118, 110, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -2px 8px rgba(0, 0, 0, 0.12);
  }
}

.d-wave-box.is-paused .d-wave-ring { animation: none; opacity: 0; }

.d-wave-box.is-paused .d-wave-icon {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.2);
  animation: none;
}

.d-volume {
  margin: 24px 0 32px;
  padding: 18px 20px;
  background: var(--d-primary-soft);
  border: 1px solid var(--d-primary-lighter);
  border-radius: 16px;
}

.d-volume__label {
  font-size: 15px;
  color: var(--d-text-soft);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.d-volume__label strong {
  color: var(--d-primary-darker);
  font-size: 18px;
}

.d-volume__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(to right, var(--d-primary) 0%, var(--d-primary) var(--vol, 100%), #e2e8f0 var(--vol, 100%), #e2e8f0 100%);
  outline: none;
}

.d-volume__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #f1f5f9);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.4), 0 0 0 3px var(--d-primary);
  border: none;
  transition: transform 0.1s;
}

.d-volume__slider::-webkit-slider-thumb:active { transform: scale(1.15); }

.d-volume__slider::-moz-range-thumb {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 3px solid var(--d-primary);
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.4);
}

.d-ended-icon {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  animation: d-fade-up 0.6s ease-out;
}

.d-ended-icon svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 8px 20px rgba(15, 118, 110, 0.2));
}

.d-ended-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  background: linear-gradient(135deg, var(--d-primary-darker), var(--d-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.d-ended-sub {
  color: var(--d-text-muted);
  margin-bottom: 24px;
  font-size: 16px;
}

.d-footer {
  padding: 16px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--d-text-muted);
  border-top: 1px solid var(--d-border);
  background: rgba(255, 255, 255, 0.6);
}

.d-alert {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
}

.d-alert--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.d-alert--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.d-alert--info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.d-install-prompt {
  display: none;
  background: linear-gradient(135deg, var(--d-primary-soft), #ecfdf5);
  border: 1px solid var(--d-primary-lighter);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 15px;
}

.d-install-prompt.is-visible { display: block; }
/* Full Stack Developer Hakan Sevim */
