/**
 * TonSoft Tools - Clean Glassmorphism Theme
 * Inspired by macOS & Dashboard UI
 */

/* ========================================
   CSS Variables
======================================== */
:root {
  /* Main Colors - Clean & Minimal */
  --color-primary: #007aff;
  --color-secondary: #5856d6;
  --color-success: #34c759;
  --color-warning: #ff9500;
  --color-danger: #ff3b30;
  --color-pink: #ff2d55;
  --color-teal: #5ac8fa;
  --color-purple: #af52de;

  /* Background */
  --bg-main: #f5f5f7;
  --bg-sidebar: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-card-solid: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.65);
  --bg-input: #f5f5f7;

  /* Text Colors */
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #aeaeb2;
  --text-white: #ffffff;

  /* Border & Shadow */
  --border-color: rgba(0, 0, 0, 0.06);
  --border-light: rgba(255, 255, 255, 0.5);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);

  /* Glass Effect */
  --glass-blur: 20px;
  --glass-saturate: 180%;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-size-xs: 11px;
  --font-size-sm: 13px;
  --font-size-base: 15px;
  --font-size-lg: 17px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
  --font-size-4xl: 40px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --header-height: 64px;
  --sidebar-width: 260px;
  --container-max: 1200px;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-main: #1c1c1e;
  --bg-sidebar: #2c2c2e;
  --bg-card: rgba(44, 44, 46, 0.72);
  --bg-card-solid: #2c2c2e;
  --bg-glass: rgba(44, 44, 46, 0.65);
  --bg-input: #3a3a3c;

  --text-primary: #f5f5f7;
  --text-secondary: #98989d;
  --text-muted: #636366;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.1);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Base Styles
======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-main);
  min-height: 100vh;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.8;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ========================================
   Typography
======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

/* ========================================
   Layout - Sidebar Style
======================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--text-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo-icon [data-lucide] {
  width: 20px;
  height: 20px;
  color: var(--bg-sidebar);
}

.sidebar-logo-text {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
}

/* Sidebar Navigation */
.sidebar-section {
  margin-bottom: var(--space-xl);
}

.sidebar-title {
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 var(--space-sm);
  margin-bottom: var(--space-sm);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.sidebar-link:hover {
  background: var(--bg-input);
  color: var(--text-primary);
  opacity: 1;
}

.sidebar-link.active {
  background: var(--text-primary);
  color: var(--bg-sidebar);
}

.sidebar-link [data-lucide] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--color-danger);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm);
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.sidebar-user-info {
  flex: 1;
}

.sidebar-user-name {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.sidebar-user-role {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--space-xl);
  min-height: 100vh;
}

/* ========================================
   Header - Simple Top Bar
======================================== */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.header-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* ========================================
   Theme Switcher - Apple Pill Style
======================================== */
.theme-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
}

[data-theme="dark"] .theme-switcher {
  background: #3a3a3c;
}

.theme-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
}

.theme-option [data-lucide] {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
}

.theme-option.active {
  color: var(--text-primary);
}

.theme-option.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-card-solid);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .theme-option.active::before {
  background: #636366;
}

[data-theme="dark"] .theme-option.active {
  color: #ffffff;
}

/* ========================================
   Navigation - Pill Style
======================================== */
.nav-pills {
  display: flex;
  align-items: center;
  background: var(--bg-glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 6px;
  gap: 4px;
  box-shadow: var(--shadow-md);
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-pill:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
  opacity: 1;
}

[data-theme="dark"] .nav-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-pill.active {
  background: var(--text-primary);
  color: var(--bg-main);
}

.nav-pill [data-lucide] {
  width: 16px;
  height: 16px;
}

.nav-icon-gif {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 6px;
  /* Kutucuk görünümünü yumuşatır */
  mix-blend-mode: multiply;
  /* Beyaz arka planı transparan gibi gösterir (Açık tema) */
}

/* Dark mode'da ikonun kaybolmaması için blend-mode'u sıfırla veya ayarla */
[data-theme="dark"] .nav-icon-gif {
  mix-blend-mode: normal;
  border-radius: 6px;
  opacity: 0.9;
}

/* ========================================
   Cards - Glass Style
======================================== */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.card-solid {
  background: var(--bg-card-solid);
  backdrop-filter: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.card-title [data-lucide] {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon [data-lucide] {
  width: 18px;
  height: 18px;
}

.card-icon.blue {
  background: rgba(0, 122, 255, 0.12);
  color: var(--color-primary);
}

.card-icon.green {
  background: rgba(52, 199, 89, 0.12);
  color: var(--color-success);
}

.card-icon.purple {
  background: rgba(175, 82, 222, 0.12);
  color: var(--color-purple);
}

.card-icon.pink {
  background: rgba(255, 45, 85, 0.12);
  color: var(--color-pink);
}

.card-icon.orange {
  background: rgba(255, 149, 0, 0.12);
  color: var(--color-warning);
}

.card-icon.teal {
  background: rgba(90, 200, 250, 0.12);
  color: var(--color-teal);
}

/* ========================================
   Container (No Sidebar Layout)
======================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ========================================
   Main Layout (Without Sidebar)
======================================== */
.main {
  min-height: 100vh;
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-3xl);
}

/* Centered Header */
.header-centered {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  height: 56px;
  background: var(--bg-glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  padding: 6px;
  gap: 4px;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

/* Logo in centered header */
.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-md) 0 var(--space-sm);
  border-right: 1px solid var(--border-color);
  margin-right: var(--space-xs);
}

.header-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--text-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo-icon [data-lucide] {
  width: 18px;
  height: 18px;
  color: var(--bg-main);
}

.header-logo-text {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
}

/* ========================================
   Hero Section
======================================== */
.hero {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.hero-title {
  font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-4xl));
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto var(--space-xl);
}

/* ========================================
   Tools Grid
======================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.tool-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

[data-theme="dark"] .tool-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.tool-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.tool-icon-wrapper.blue {
  background: rgba(0, 122, 255, 0.12);
}

.tool-icon-wrapper.green {
  background: rgba(52, 199, 89, 0.12);
}

.tool-icon-wrapper.purple {
  background: rgba(175, 82, 222, 0.12);
}

.tool-icon-wrapper.pink {
  background: rgba(255, 45, 85, 0.12);
}

.tool-icon-wrapper.orange {
  background: rgba(255, 149, 0, 0.12);
}

.tool-icon-wrapper.teal {
  background: rgba(90, 200, 250, 0.12);
}

.tool-icon-wrapper [data-lucide] {
  width: 24px;
  height: 24px;
}

.tool-icon-wrapper.blue [data-lucide] {
  color: var(--color-primary);
}

.tool-icon-wrapper.green [data-lucide] {
  color: var(--color-success);
}

.tool-icon-wrapper.purple [data-lucide] {
  color: var(--color-purple);
}

.tool-icon-wrapper.pink [data-lucide] {
  color: var(--color-pink);
}

.tool-icon-wrapper.orange [data-lucide] {
  color: var(--color-warning);
}

.tool-icon-wrapper.teal [data-lucide] {
  color: var(--color-teal);
}

.tool-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.tool-desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: var(--space-md);
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.tool-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.tool-tag [data-lucide] {
  width: 12px;
  height: 12px;
}

.tool-tag.green {
  background: rgba(52, 199, 89, 0.12);
  color: var(--color-success);
}

.tool-tag.blue {
  background: rgba(0, 122, 255, 0.12);
  color: var(--color-primary);
}

.tool-tag.purple {
  background: rgba(175, 82, 222, 0.12);
  color: var(--color-purple);
}

.tool-tag.pink {
  background: rgba(255, 45, 85, 0.12);
  color: var(--color-pink);
}

.tool-tag.orange {
  background: rgba(255, 149, 0, 0.12);
  color: var(--color-warning);
}

.tool-cta {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-primary);
}

.tool-cta [data-lucide] {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.tool-card:hover .tool-cta [data-lucide] {
  transform: translateX(4px);
}

.tool-card-soon {
  opacity: 0.6;
  cursor: default;
}

.tool-card-soon:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* ========================================
   Buttons
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  opacity: 0.85;
  color: var(--bg-main);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.btn-warning {
  background: #f59e0b;
  color: #fff;
  border: none;
}

.btn-warning:hover {
  background: #d97706;
  color: #fff;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border: none;
}

.btn-danger:hover {
  background: #dc2626;
  color: #fff;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
}

.btn [data-lucide] {
  width: 18px;
  height: 18px;
}

/* ========================================
   Section
======================================== */
.section {
  padding: var(--space-2xl) 0;
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  text-align: center;
}

.section-subtitle {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-xl);
}

/* ========================================
   Features Section
======================================== */
.features-section {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin: var(--space-xl) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}

.feature-item {
  text-align: center;
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  background: rgba(0, 122, 255, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.feature-icon-wrapper [data-lucide] {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.feature-item h3 {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.feature-item p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ========================================
   Footer
======================================== */
.footer {
  background: var(--bg-card-solid);
  border-top: 1px solid var(--border-color);
  padding: var(--space-xl) 0;
  margin-top: auto;
}

.footer-content {
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.footer-brand [data-lucide] {
  width: 20px;
  height: 20px;
}

.footer-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-links [data-lucide] {
  width: 14px;
  height: 14px;
}

.footer-links .divider {
  color: var(--text-muted);
}

.footer-copyright {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ========================================
   Forms
======================================== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-family: inherit;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

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

/* ========================================
   Utilities
======================================== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 {
  margin-top: var(--space-md);
}

.mt-2 {
  margin-top: var(--space-lg);
}

.mt-3 {
  margin-top: var(--space-xl);
}

.mb-1 {
  margin-bottom: var(--space-md);
}

.mb-2 {
  margin-bottom: var(--space-lg);
}

.mb-3 {
  margin-bottom: var(--space-xl);
}

.hidden {
  display: none !important;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .header {
    left: 0;
  }

  .header-centered {
    width: calc(100% - var(--space-lg) * 2);
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .features-section {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
  }

  .header-centered {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-pill span:not([data-lucide]) {
    display: none;
  }

  .header-logo-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .tool-card {
    padding: var(--space-md);
  }
}

/* ========================================
   Animations
======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* ========================================
   Lucide Icons Base
======================================== */
[data-lucide] {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ========================================
   Toast Notifications
======================================== */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform var(--transition);
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  border-left: 3px solid var(--color-success);
}

.toast-error {
  border-left: 3px solid var(--color-danger);
}

.toast-warning {
  border-left: 3px solid var(--color-warning);
}

.toast-info {
  border-left: 3px solid var(--color-primary);
}

/* ========================================
   Mobile Menu
======================================== */
.mobile-menu {
  position: fixed;
  top: calc(56px + var(--space-md) + var(--space-sm));
  left: var(--space-md);
  right: var(--space-md);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  transform: translateY(-20px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  box-shadow: var(--shadow-lg);
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--bg-input);
  color: var(--text-primary);
  opacity: 1;
}

.mobile-nav-link [data-lucide] {
  width: 20px;
  height: 20px;
}

/* Mobile only elements */
.mobile-only {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-only {
    display: flex;
  }

  .desktop-only {
    display: none;
  }
}

/* Theme Switcher in Header */
.header-theme-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  padding: 3px;
  margin-left: var(--space-sm);
  border-left: 1px solid var(--border-color);
  padding-left: var(--space-md);
}

[data-theme="dark"] .header-theme-switcher {
  background: #3a3a3c;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: all var(--transition);
}

.theme-btn [data-lucide] {
  width: 16px;
  height: 16px;
}

.theme-btn.active {
  background: var(--bg-card-solid);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .theme-btn.active {
  background: #636366;
  color: #ffffff;
}

/* ========================================
   GIF Icon Styles
======================================== */

/* Navigation GIF Icon */
.nav-icon-gif {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.mobile-nav-link .nav-icon-gif {
  width: 22px;
  height: 22px;
}

/* Button GIF Icon */
.btn-icon-gif {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Tool Card GIF Icon */
.tool-icon-gif-wrapper {
  background: transparent;
}

.tool-icon-gif {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Title GIF Icon */
.title-icon-gif {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
}

/* Logo GIF Icons */
.logo-gif {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.header-logo-icon {
  background: transparent;
}

.footer-logo-gif {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ========================================
   Spinning Wheel Module
======================================== */

/* Layout */
.wheel-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-xl);
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .wheel-layout {
    grid-template-columns: 1fr;
  }
}

/* Panel */
.wheel-panel .card {
  padding: var(--space-lg);
}

.panel-header {
  margin-bottom: var(--space-lg);
}

.panel-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-sm);
}

.panel-icon {
  width: 20px;
  height: 20px;
}

.option-count {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* Toggle Switch */
.input-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.input-mode-toggle span {
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  width: 50px;
  height: 28px;
  cursor: pointer;
}

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

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  transition: background var(--transition);
  border: 1px solid var(--border-color);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateY(-50%) translateX(22px);
}

/* Input Row */
.input-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.input-row .form-input {
  flex: 1;
}

/* Bulk Input */
.bulk-input-mode .form-textarea {
  margin-bottom: var(--space-md);
  font-size: var(--font-size-sm);
  min-height: 150px;
}

.btn-block {
  width: 100%;
}

/* Options List */
.options-list {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: var(--space-md);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  color: var(--text-muted);
}

.empty-state [data-lucide] {
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-sm);
}

.option-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.option-item:last-child {
  border-bottom: none;
}

.option-item:hover {
  background: var(--bg-input);
}

.option-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.option-text {
  flex: 1;
  font-size: var(--font-size-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  opacity: 0;
}

.option-item:hover .option-delete {
  opacity: 1;
}

.option-delete:hover {
  background: rgba(255, 59, 48, 0.1);
  color: var(--color-danger);
}

.option-delete [data-lucide] {
  width: 14px;
  height: 14px;
}

/* Panel Actions */
.panel-actions {
  display: flex;
  gap: var(--space-sm);
}

.panel-actions .btn {
  flex: 1;
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-xs);
}

.btn-sm [data-lucide] {
  width: 14px;
  height: 14px;
}

/* Wheel Container */
.wheel-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.wheel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wheelCanvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Pointer */
.wheel-pointer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.pointer-svg {
  width: 40px;
  height: 50px;
  color: var(--text-primary);
}

/* Spin Button */
.spin-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: white;
  border: 4px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-lg);
  z-index: 5;
}

.spin-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.spin-button:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.spin-button.spinning {
  pointer-events: none;
  animation: pulse 0.5s ease-in-out infinite;
}

.spin-icon {
  width: 28px;
  height: 28px;
  color: var(--text-primary);
  margin-left: 4px;
  /* Play ikonu için görsel düzeltme */
}

@keyframes pulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

/* Result */
.wheel-result {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.result-card {
  background: var(--bg-card-solid);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.3s ease;
  max-width: 90%;
}

.result-label {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.result-text {
  display: block;
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* ========================================
   Coin Flip Module
======================================== */

/* Layout */
.coinflip-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-xl);
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .coinflip-layout {
    grid-template-columns: 1fr;
  }

  .coin-container {
    order: -1;
  }
}

/* Panel */
.coinflip-panel .card {
  padding: var(--space-lg);
}

/* Flip Count Section */
.flip-count-section {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
}

.flip-count-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.flip-count-buttons {
  display: flex;
  gap: var(--space-sm);
}

.flip-count-btn {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.flip-count-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.flip-count-btn.active {
  background: var(--text-primary);
  color: var(--bg-main);
  border-color: var(--text-primary);
}

/* Stats Section */
.stats-section {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
}

.stats-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.stat-item {
  text-align: center;
  padding: var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
}

.stat-item.heads {
  background: rgba(255, 149, 0, 0.1);
}

.stat-item.tails {
  background: rgba(0, 122, 255, 0.1);
}

.stat-value {
  display: block;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
}

.stat-item.heads .stat-value {
  color: var(--color-warning);
}

.stat-item.tails .stat-value {
  color: var(--color-primary);
}

.stat-label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Stats Bar */
.stats-bar {
  display: flex;
  height: 8px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--bg-input);
}

.stats-bar-heads {
  background: var(--color-warning);
  transition: width var(--transition);
}

.stats-bar-tails {
  background: var(--color-primary);
  transition: width var(--transition);
}

.stats-percentages {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* History Section */
.history-section {
  margin-bottom: 0;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.history-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.history-list {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-height: 200px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.history-item:last-child {
  border-bottom: none;
}

.history-coin {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: white;
}

.history-coin.heads {
  background: var(--color-warning);
}

.history-coin.tails {
  background: var(--color-primary);
}

.history-text {
  flex: 1;
  font-size: var(--font-size-sm);
}

.history-time {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* Coin Container */
.coin-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  min-height: 400px;
}

/* 3D Coin */
.coin-wrapper {
  perspective: 1000px;
  margin-bottom: var(--space-xl);
}

.coin {
  width: 200px;
  height: 200px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.1s;
}

.coin-side {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.coin-heads {
  background: transparent;
}

.coin-tails {
  background: transparent;
  transform: rotateY(180deg);
}

.coin-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.coin-text {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Flip Button */
.flip-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-2xl);
  background: var(--text-primary);
  color: var(--bg-main);
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--font-size-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-lg);
}

.flip-button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.flip-button:active {
  transform: scale(0.98);
}

.flip-button.flipping {
  pointer-events: none;
  opacity: 0.7;
}

.flip-icon {
  width: 24px;
  height: 24px;
}

/* Single Result */
.flip-result {
  margin-top: var(--space-xl);
  animation: fadeIn 0.3s ease;
}

.result-text {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  padding: var(--space-md) var(--space-2xl);
  border-radius: var(--radius-lg);
}

.result-text.heads {
  background: rgba(255, 149, 0, 0.15);
  color: var(--color-warning);
}

.result-text.tails {
  background: rgba(0, 122, 255, 0.15);
  color: var(--color-primary);
}

/* Multi Result */
.multi-result {
  margin-top: var(--space-xl);
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.multi-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-xl);
  font-weight: 700;
}

.summary-item.heads {
  color: var(--color-warning);
}

.summary-item.tails {
  color: var(--color-primary);
}

.summary-divider {
  color: var(--text-muted);
}

.multi-coins {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.mini-coin {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: white;
}

.mini-coin.heads {
  background: var(--color-warning);
}

.mini-coin.tails {
  background: var(--color-primary);
}

/* ========================================
   Okey 101 Module
======================================== */

/* Setup Screen */
.okey-setup {
  max-width: 600px;
  margin: 0 auto;
}

.setup-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.setup-icon {
  width: 60px;
  height: 60px;
  margin-bottom: var(--space-md);
}

.setup-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-xs);
}

.setup-subtitle {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* Mode Selection */
.mode-selection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
}

.mode-btn:hover {
  border-color: var(--color-primary);
}

.mode-btn.active {
  background: rgba(0, 122, 255, 0.1);
  border-color: var(--color-primary);
}

.mode-btn [data-lucide] {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

.mode-title {
  font-weight: 600;
  font-size: var(--font-size-base);
}

.mode-desc {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

/* Players Form */
.form-section-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.player-input-group label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: 500;
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.teams-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.team-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.team-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
}

/* Hand Count */
.hand-count-section {
  margin-bottom: var(--space-xl);
}

.hand-count-selector .form-select {
  width: 100%;
}

/* Game Screen */
.okey-game {
  max-width: 900px;
  margin: 0 auto;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.game-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.game-mode-badge {
  background: var(--color-primary);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.current-hand {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.game-actions {
  display: flex;
  gap: var(--space-sm);
}

/* Score Table */
.score-table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.score-table th,
.score-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.score-table th {
  background: var(--bg-input);
  font-weight: 600;
  white-space: nowrap;
}

.score-table .hand-col {
  width: 50px;
  text-align: center;
}

.score-table .player-col {
  min-width: 100px;
}

.hand-row.current {
  background: rgba(0, 122, 255, 0.08);
}

.hand-number {
  font-weight: 600;
  color: var(--text-secondary);
}

.score-cell {
  font-weight: 500;
}

.score-cell.positive {
  color: var(--color-danger);
}

.score-cell.negative {
  color: var(--color-success);
}

/* Penalty Row */
.penalty-row td {
  background: var(--bg-input);
  border-top: 2px solid var(--border-color);
}

.penalty-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.penalty-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
  background: var(--bg-card-solid);
}

.penalty-btn [data-lucide] {
  width: 14px;
  height: 14px;
}

.penalty-btn.minus {
  color: var(--color-success);
}

.penalty-btn.minus:hover {
  background: rgba(52, 199, 89, 0.15);
  border-color: var(--color-success);
}

.penalty-btn.plus {
  color: var(--color-danger);
}

.penalty-btn.plus:hover {
  background: rgba(255, 59, 48, 0.15);
  border-color: var(--color-danger);
}

.penalty-value {
  min-width: 40px;
  font-weight: 600;
}

.penalty-value.positive {
  color: var(--color-danger);
}

.penalty-value.negative {
  color: var(--color-success);
}

/* Total Row */
.total-row td {
  background: var(--text-primary);
  color: var(--bg-main);
  font-weight: 700;
  font-size: var(--font-size-base);
}

.total-cell.positive {
  color: #ff6b6b !important;
}

.total-cell.negative {
  color: #51cf66 !important;
}

/* Score Input Panel */
.score-input-panel {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.score-input-panel .panel-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-md);
  text-align: center;
}

.score-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.score-input-item label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: 500;
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-input-item .form-input {
  text-align: center;
}

/* Game Footer */
.game-footer {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Dice Modal */
.dice-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dice-content {
  background: var(--bg-card-solid);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.3s ease;
}

.dice-container {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.dice {
  width: 80px;
  height: 80px;
  background: white;
  border: 3px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.dice-face {
  font-size: 48px;
  line-height: 1;
}

.dice.rolling {
  animation: diceRoll 0.5s ease;
}

@keyframes diceRoll {

  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }

  25% {
    transform: rotate(15deg) scale(1.1);
  }

  50% {
    transform: rotate(-15deg) scale(0.9);
  }

  75% {
    transform: rotate(10deg) scale(1.05);
  }
}

.dice-total {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-lg);
}

.dice-total strong {
  color: var(--color-primary);
  font-size: var(--font-size-2xl);
}

.dice-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* Responsive */
@media (max-width: 600px) {

  .players-grid,
  .teams-grid,
  .mode-selection {
    grid-template-columns: 1fr;
  }

  .score-inputs {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========================================
   Raffle Module
======================================== */

/* Layout */
.raffle-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-xl);
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .raffle-layout {
    grid-template-columns: 1fr;
  }
}

/* Panel */
.raffle-panel .card {
  padding: var(--space-lg);
}

/* Participants List */
.participants-list {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: var(--space-md);
}

.participant-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.participant-item:last-child {
  border-bottom: none;
}

.participant-item:hover {
  background: var(--bg-input);
}

.participant-number {
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 600;
  flex-shrink: 0;
}

.participant-name {
  flex: 1;
  font-size: var(--font-size-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  opacity: 0;
}

.participant-item:hover .participant-delete {
  opacity: 1;
}

.participant-delete:hover {
  background: rgba(255, 59, 48, 0.1);
  color: var(--color-danger);
}

.participant-delete [data-lucide] {
  width: 14px;
  height: 14px;
}

/* Raffle Container */
.raffle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-lg);
}

/* Winner Count */
.winner-count-section {
  text-align: center;
}

.winner-count-section label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.winner-count-buttons {
  display: flex;
  gap: var(--space-sm);
}

.winner-count-btn {
  width: 44px;
  height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.winner-count-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.winner-count-btn.active {
  background: var(--color-pink);
  color: white;
  border-color: var(--color-pink);
}

/* Raffle Display */
.raffle-display {
  width: 100%;
  max-width: 400px;
}

.raffle-box {
  background: var(--bg-card-solid);
  border: 3px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.raffle-box.animating {
  border-color: var(--color-pink);
  box-shadow: 0 0 30px rgba(255, 45, 85, 0.3);
}

.raffle-placeholder {
  color: var(--text-muted);
  font-size: var(--font-size-lg);
}

.raffle-name-display {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
  animation: fadeIn 0.1s ease;
}

.raffle-winner-display {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--color-pink);
  animation: winnerPop 0.5s ease;
}

@keyframes winnerPop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Raffle Button */
.raffle-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-2xl);
  background: linear-gradient(135deg, var(--color-pink), #ff6b9d);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--font-size-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(255, 45, 85, 0.4);
}

.raffle-button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(255, 45, 85, 0.5);
}

.raffle-button:active {
  transform: scale(0.98);
}

.raffle-button.running {
  pointer-events: none;
  opacity: 0.8;
}

.raffle-button.running [data-lucide] {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.raffle-button [data-lucide] {
  width: 24px;
  height: 24px;
}

/* Winners Section */
.winners-section {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card-solid);
  border: 2px solid var(--color-pink);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  animation: fadeIn 0.3s ease;
}

.winners-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-md);
  color: var(--color-pink);
}

.winners-title [data-lucide] {
  width: 24px;
  height: 24px;
}

.winners-list {
  margin-bottom: var(--space-md);
}

.winner-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 45, 85, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
}

.winner-item:last-child {
  margin-bottom: 0;
}

.winner-rank {
  font-weight: 700;
  color: var(--color-pink);
}

.winner-name {
  flex: 1;
  font-weight: 600;
}

.winner-icon {
  width: 18px;
  height: 18px;
  color: #ffd700;
}

.winners-actions {
  display: flex;
  gap: var(--space-sm);
}

.winners-actions .btn {
  flex: 1;
}

/* Raffle History */
.raffle-history {
  width: 100%;
  max-width: 400px;
  background: var(--bg-input);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.raffle-history .history-title {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.raffle-history .history-title [data-lucide] {
  width: 16px;
  height: 16px;
}

.history-items {
  max-height: 150px;
  overflow-y: auto;
}

.history-items .empty-text {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-align: center;
}

.raffle-history .history-item {
  padding: var(--space-sm);
  background: var(--bg-card-solid);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xs);
}

.raffle-history .history-item:last-child {
  margin-bottom: 0;
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-winners {
  font-size: var(--font-size-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ========================================
   Tournament Module
======================================== */

/* Setup */
.tournament-setup {
  max-width: 700px;
  margin: 0 auto;
}

/* Bracket Size */
.bracket-size-section {
  margin-bottom: var(--space-xl);
}

.bracket-size-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.bracket-size-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
}

.bracket-size-btn:hover {
  border-color: var(--color-purple);
}

.bracket-size-btn.active {
  background: rgba(175, 82, 222, 0.1);
  border-color: var(--color-purple);
}

.bracket-size-btn .size-number {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--color-purple);
}

.bracket-size-btn .size-label {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

/* Participants Section */
.participants-section {
  margin-bottom: var(--space-xl);
}

.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.participant-slot {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.participant-slot.filled {
  border-style: solid;
  background: var(--bg-card-solid);
}

.slot-number {
  width: 24px;
  height: 24px;
  background: var(--text-muted);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 600;
  flex-shrink: 0;
}

.participant-slot.filled .slot-number {
  background: var(--color-purple);
}

.slot-name {
  flex: 1;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-slot.filled .slot-name {
  color: var(--text-primary);
  font-weight: 500;
}

.slot-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.slot-remove:hover {
  background: rgba(255, 59, 48, 0.1);
  color: var(--color-danger);
}

.slot-remove [data-lucide] {
  width: 12px;
  height: 12px;
}

/* Setup Actions */
.setup-actions {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.setup-actions .btn {
  flex: 1;
}

/* Tournament Game */
.tournament-game {
  max-width: 100%;
  overflow-x: auto;
}

.tournament-badge {
  background: var(--color-purple);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

/* Bracket */
.bracket-wrapper {
  overflow-x: auto;
  padding: var(--space-lg) 0;
}

.bracket {
  display: flex;
  gap: var(--space-xl);
  min-width: max-content;
  padding: var(--space-md);
}

.bracket-round {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.round-title {
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
}

.round-matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
  gap: var(--space-lg);
}

/* Match */
.bracket-match {
  background: var(--bg-card-solid);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}

.bracket-match.playable {
  cursor: pointer;
  border-color: var(--color-purple);
}

.bracket-match.playable:hover {
  box-shadow: 0 4px 20px rgba(175, 82, 222, 0.3);
  transform: translateY(-2px);
}

.bracket-match.completed {
  opacity: 0.8;
}

.match-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-color);
  font-size: var(--font-size-sm);
}

.match-player:last-child {
  border-bottom: none;
}

.match-player.winner {
  background: rgba(175, 82, 222, 0.1);
}

.match-player.winner .player-name {
  font-weight: 600;
  color: var(--color-purple);
}

.match-player [data-lucide] {
  width: 16px;
  height: 16px;
  color: var(--color-success);
}

/* Champion Section */
.champion-section {
  display: flex;
  justify-content: center;
  padding: var(--space-2xl);
}

.champion-card {
  text-align: center;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
  animation: championPop 0.5s ease;
}

.champion-icon {
  font-size: 64px;
  margin-bottom: var(--space-md);
}

.champion-title {
  font-size: var(--font-size-xl);
  color: #8b4513;
  margin-bottom: var(--space-sm);
}

.champion-name {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: #5d3a1a;
}

@keyframes championPop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Match Modal */
.match-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.match-modal-content {
  background: var(--bg-card-solid);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  width: 90%;
  max-width: 400px;
  animation: scaleIn 0.3s ease;
}

.match-modal-title {
  text-align: center;
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-xl);
}

.match-players {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.match-player-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
}

.match-player-btn:hover {
  border-color: var(--color-purple);
}

.match-player-btn.selected {
  background: rgba(175, 82, 222, 0.15);
  border-color: var(--color-purple);
}

.match-player-btn .player-name {
  font-weight: 600;
  font-size: var(--font-size-base);
}

.match-player-btn .winner-badge {
  display: none;
  font-size: var(--font-size-xs);
  color: var(--color-purple);
  font-weight: 500;
}

.match-player-btn.selected .winner-badge {
  display: block;
}

.vs-text {
  font-weight: 700;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

/* Responsive */
@media (max-width: 600px) {
  .bracket-size-buttons {
    flex-wrap: wrap;
  }

  .bracket-size-btn {
    flex: 1;
    min-width: 80px;
  }

  .participants-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========================================
   Dice Module - Three.js 3D
======================================== */

.dice-page-3d {
  max-width: 600px;
  margin: 0 auto;
}

.dice-page-3d .card {
  padding: var(--space-lg);
}

.dice-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.dice-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-xs);
}

.dice-subtitle {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.dice-controls {
  margin-bottom: var(--space-lg);
}

.control-group {
  margin-bottom: var(--space-md);
}

.dice-count-buttons {
  display: flex;
  gap: var(--space-sm);
}

.dice-count-btn {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dice-count-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.dice-count-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* 3D Canvas */
.dice-canvas-container {
  position: relative;
  width: 100%;
  height: 300px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

#diceCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.dice-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: rgba(26, 26, 46, 0.9);
  color: white;
  font-size: var(--font-size-sm);
}

.dice-loading.hidden {
  display: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Result Display */
.dice-result {
  text-align: center;
  margin-bottom: var(--space-lg);
  min-height: 60px;
}

.result-values {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.result-die {
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #ffffff, #e0e0e0);
  border: 2px solid #333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  animation: resultPop 0.4s ease;
}

[data-theme="dark"] .result-die {
  background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
  border-color: #555;
}

.die-value {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: #1a1a1a;
}

[data-theme="dark"] .die-value {
  color: #fff;
}

@keyframes resultPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.result-total {
  font-size: var(--font-size-lg);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  display: inline-block;
}

.result-total strong {
  font-size: var(--font-size-xl);
  color: var(--color-primary);
}

/* Roll Button */
.dice-roll-btn {
  margin-bottom: var(--space-lg);
}

.dice-roll-btn:disabled [data-lucide] {
  animation: spin 1s linear infinite;
}

/* History */
.dice-history {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-lg);
}

.dice-history h4 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.dice-history .history-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-sm);
}

.dice-history .history-dice {
  font-weight: 700;
  color: var(--color-primary);
  min-width: 60px;
}

.dice-history .history-results {
  flex: 1;
  color: var(--text-secondary);
}

.dice-history .history-total {
  font-weight: 700;
  color: var(--color-success);
}

.dice-history .history-time {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

/* Floating Buttons */
.floating-buttons {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column-reverse;
  /* Scroll üstte, Ses altta */
  gap: 12px;
  z-index: 900;
}

.float-btn {
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all var(--transition);
  opacity: 1;
  transform: translateY(0);
}

.float-btn:hover {
  color: var(--color-primary);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.float-btn.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  height: 0;
  margin: 0;
  border: none;
}

/* Sound Toggle Specific */
#globalSoundToggle.muted {
  color: var(--text-muted);
}

#globalSoundToggle.muted::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 20px;
  background: currentColor;
  transform: rotate(45deg);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: var(--space-md);
  z-index: 1000;
  animation: slideUp 0.5s ease;
  backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
  .cookie-banner {
    left: auto;
    /* Sadece sağda kalsın */
  }
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.cookie-content p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.cookie-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.cookie-banner.hidden {
  display: none;
}

@keyframes slideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Legacy Dice Module Styles */
.dice-page {
  max-width: 550px;
  margin: 0 auto;
}

.dice-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.dice-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-xs);
}

.dice-subtitle {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.section-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.dice-type-section,
.dice-count-section {
  margin-bottom: var(--space-lg);
}

.dice-type-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.dice-type-btn {
  flex: 1;
  min-width: 60px;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dice-type-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.dice-type-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Dice Shape Icons */
.dice-shape {
  width: 20px;
  height: 20px;
  display: block;
}

.dice-shape.d4 {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 18px solid currentColor;
}

.dice-shape.d6 {
  width: 16px;
  height: 16px;
  background: currentColor;
  border-radius: 2px;
}

.dice-shape.d8 {
  width: 16px;
  height: 16px;
  background: currentColor;
  transform: rotate(45deg);
}

.dice-shape.d10 {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 12px solid currentColor;
  position: relative;
}

.dice-shape.d10::after {
  content: "";
  position: absolute;
  top: 10px;
  left: -10px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid currentColor;
}

.dice-shape.d12 {
  width: 18px;
  height: 18px;
  background: currentColor;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.dice-shape.d20 {
  width: 18px;
  height: 18px;
  background: currentColor;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Dice Count Buttons */
.dice-count-buttons {
  display: flex;
  gap: var(--space-sm);
}

.dice-count-btn {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dice-count-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.dice-count-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* 3D Dice Container */
.dice-3d-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  min-height: 150px;
  margin: var(--space-xl) 0;
  perspective: 600px;
}

/* 3D Dice */
.dice-3d {
  position: relative;
  width: 80px;
  height: 80px;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.dice-3d.d6 {
  transform: rotateX(-20deg) rotateY(20deg);
}

/* Rolling Animation */
.dice-3d.rolling {
  animation: diceRoll3D 1s ease-out;
}

@keyframes diceRoll3D {
  0% {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
  }

  25% {
    transform: rotateX(var(--roll-x, 360deg)) rotateY(180deg) rotateZ(90deg) translateY(-30px);
  }

  50% {
    transform: rotateX(var(--roll-x, 720deg)) rotateY(var(--roll-y, 360deg)) rotateZ(180deg) translateY(10px);
  }

  75% {
    transform: rotateX(var(--roll-x, 900deg)) rotateY(var(--roll-y, 540deg)) rotateZ(270deg) translateY(-10px);
  }

  100% {
    transform: rotateX(var(--roll-x, 1080deg)) rotateY(var(--roll-y, 720deg)) rotateZ(var(--roll-z, 360deg));
  }
}

.dice-3d.rolled {
  animation: diceBounce 0.3s ease;
}

@keyframes diceBounce {

  0%,
  100% {
    transform: scale(1) rotateX(-20deg) rotateY(20deg);
  }

  50% {
    transform: scale(1.15) rotateX(-20deg) rotateY(20deg);
  }
}

/* D6 Faces */
.dice-3d.d6 .dice-face {
  position: absolute;
  width: 80px;
  height: 80px;
  background: linear-gradient(145deg, #ffffff, #e6e6e6);
  border: 3px solid #333;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: #1a1a1a;
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.5),
    inset 0 -2px 5px rgba(0, 0, 0, 0.1);
  backface-visibility: hidden;
}

[data-theme="dark"] .dice-3d.d6 .dice-face {
  background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
  border-color: #555;
  color: #fff;
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.1),
    inset 0 -2px 5px rgba(0, 0, 0, 0.3);
}

.dice-3d.d6 .face-1 {
  transform: translateZ(40px);
}

.dice-3d.d6 .face-2 {
  transform: rotateX(90deg) translateZ(40px);
}

.dice-3d.d6 .face-3 {
  transform: rotateY(-90deg) translateZ(40px);
}

.dice-3d.d6 .face-4 {
  transform: rotateY(90deg) translateZ(40px);
}

.dice-3d.d6 .face-5 {
  transform: rotateX(-90deg) translateZ(40px);
}

.dice-3d.d6 .face-6 {
  transform: rotateX(180deg) translateZ(40px);
}

/* Polyhedral Dice (D4, D8, D10, D12, D20) */
.dice-3d .dice-poly {
  width: 90px;
  height: 90px;
  background: linear-gradient(145deg, #007aff, #0051a8);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 122, 255, 0.4),
    inset 0 2px 10px rgba(255, 255, 255, 0.3);
  position: relative;
}

.dice-3d.d4 .dice-poly {
  background: linear-gradient(145deg, #ff2d55, #c41e3a);
  box-shadow: 0 8px 25px rgba(255, 45, 85, 0.4),
    inset 0 2px 10px rgba(255, 255, 255, 0.3);
}

.dice-3d.d8 .dice-poly {
  background: linear-gradient(145deg, #34c759, #228b22);
  box-shadow: 0 8px 25px rgba(52, 199, 89, 0.4),
    inset 0 2px 10px rgba(255, 255, 255, 0.3);
}

.dice-3d.d10 .dice-poly {
  background: linear-gradient(145deg, #ff9500, #cc7a00);
  box-shadow: 0 8px 25px rgba(255, 149, 0, 0.4),
    inset 0 2px 10px rgba(255, 255, 255, 0.3);
}

.dice-3d.d12 .dice-poly {
  background: linear-gradient(145deg, #af52de, #8b3aae);
  box-shadow: 0 8px 25px rgba(175, 82, 222, 0.4),
    inset 0 2px 10px rgba(255, 255, 255, 0.3);
}

.dice-3d.d20 .dice-poly {
  background: linear-gradient(145deg, #5ac8fa, #3a9ec9);
  box-shadow: 0 8px 25px rgba(90, 200, 250, 0.4),
    inset 0 2px 10px rgba(255, 255, 255, 0.3);
}

.poly-value {
  font-size: 36px;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.poly-value.result-show {
  animation: valuePopIn 0.4s ease;
}

@keyframes valuePopIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.poly-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  position: absolute;
  bottom: 8px;
}

/* Dice Total Display */
.dice-total-display {
  text-align: center;
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
}

.dice-total-display strong {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
}

/* Roll Button */
.dice-roll-btn {
  position: relative;
  overflow: hidden;
}

.dice-roll-btn [data-lucide] {
  animation: none;
}

.dice-roll-btn:disabled [data-lucide] {
  animation: spin 1s linear infinite;
}

/* Dice History */
.dice-history {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
}

.dice-history h4 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.dice-history .history-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-sm);
}

.dice-history .history-dice {
  font-weight: 700;
  color: var(--color-primary);
  min-width: 65px;
}

.dice-history .history-results {
  flex: 1;
  color: var(--text-secondary);
}

.dice-history .history-total {
  font-weight: 700;
  color: var(--color-success);
}

.dice-history .history-time {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

/* ========================================
   Random Number Module
======================================== */

.random-page {
  max-width: 500px;
  margin: 0 auto;
}

.random-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.random-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-xs);
}

.random-subtitle {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.range-inputs {
  display: flex;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.range-input-group {
  flex: 1;
}

.range-input-group label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: 500;
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.range-input-group .form-input {
  text-align: center;
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.range-separator {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: var(--space-sm);
}

.count-section {
  margin-bottom: var(--space-lg);
}

.count-buttons {
  display: flex;
  gap: var(--space-sm);
}

.count-btn {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.count-btn:hover {
  border-color: var(--color-success);
  color: var(--color-success);
}

.count-btn.active {
  background: var(--color-success);
  color: white;
  border-color: var(--color-success);
}

.unique-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  font-size: var(--font-size-sm);
}

.random-display {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin: var(--space-xl) 0;
  min-height: 80px;
  align-items: center;
}

.random-display.generating .random-number {
  animation: pulse 0.3s ease infinite;
}

.random-number {
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, var(--color-success), #2ecc71);
  color: white;
  font-size: var(--font-size-2xl);
  font-weight: 800;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
  animation: fadeIn 0.3s ease;
}

.random-history {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
}

.random-history h4 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.random-history .history-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-sm);
}

.random-history .history-range {
  font-weight: 600;
  color: var(--color-success);
  min-width: 70px;
}

.random-history .history-results {
  flex: 1;
  font-weight: 500;
}

.random-history .history-time {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

/* ========================================
   Team Builder Module
======================================== */

.teams-page {
  max-width: 1000px;
  margin: 0 auto;
}

.teams-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 900px) {
  .teams-layout {
    grid-template-columns: 1fr;
  }
}

.teams-panel .card {
  padding: var(--space-lg);
}

.teams-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.teams-panel .panel-header h3 {
  font-size: var(--font-size-base);
  font-weight: 600;
}

.person-count {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.bulk-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-md);
  font-size: var(--font-size-sm);
}

.bulk-input {
  margin-bottom: var(--space-md);
}

.bulk-input .form-textarea {
  margin-bottom: var(--space-sm);
}

.persons-list {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: var(--space-md);
}

.person-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.person-item:last-child {
  border-bottom: none;
}

.person-number {
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.person-name {
  flex: 1;
  font-size: var(--font-size-sm);
}

.person-delete {
  opacity: 0;
  transition: opacity var(--transition-fast);
  color: var(--text-muted);
}

.person-item:hover .person-delete {
  opacity: 1;
}

.person-delete:hover {
  color: var(--color-danger);
}

.person-delete [data-lucide] {
  width: 14px;
  height: 14px;
}

/* Teams Container */
.teams-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.team-count-section {
  text-align: center;
}

.team-count-section label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.team-count-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.team-count-btn {
  width: 50px;
  height: 50px;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.team-count-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.team-count-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Teams Result */
.teams-result {
  animation: fadeIn 0.3s ease;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.team-card {
  background: var(--bg-card-solid);
  border: 2px solid var(--team-color, var(--color-primary));
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.team-header {
  background: var(--team-color, var(--color-primary));
  color: white;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.team-name {
  font-weight: 600;
}

.team-count {
  font-size: var(--font-size-xs);
  opacity: 0.8;
}

.team-members {
  padding: var(--space-sm);
}

.team-member {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--border-color);
}

.team-member:last-child {
  border-bottom: none;
}

.teams-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.teams-actions .btn {
  min-width: 150px;
}

/* ========================================
   Auth Pages (Login, Register, Reset Password)
======================================== */
.auth-container {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at top right,
      rgba(0, 122, 255, 0.1),
      transparent 40%),
    radial-gradient(circle at bottom left,
      rgba(88, 86, 214, 0.1),
      transparent 40%);
}

.auth-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 3rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.6s ease-out;
}

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

.auth-icon {
  margin-bottom: 1rem;
  display: inline-block;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg,
      var(--text-primary) 0%,
      var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.auth-alert.error {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.auth-alert.success {
  background: rgba(52, 199, 89, 0.1);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.2);
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.forgot-link {
  font-size: 0.85rem;
  color: var(--color-primary);
}

.input-icon-left {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.input-group .form-input {
  padding-left: 3rem;
  height: 50px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.input-group .form-input:focus {
  background: var(--bg-card-solid);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.btn-lg {
  height: 54px;
  font-size: 1.1rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 1rem;
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.auth-footer a {
  font-weight: 600;
  color: var(--color-primary);
}

/* Checkbox Style */
.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  left: 0;
  top: 0;
  height: 20px;
  width: 20px;
  background-color: var(--bg-input);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.checkbox-container:hover input~.checkmark {
  background-color: var(--border-light);
}

.checkbox-container input:checked~.checkmark {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked~.checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ========================================
   Profile Page
======================================== */
.profile-container {
  display: flex;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1rem;
  min-height: calc(100vh - 140px);
  position: relative;
  z-index: 1;
}

.profile-sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg-card);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 90px;
  box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.08);
}

.user-brief {
  text-align: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.user-avatar-lg {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #007aff, #5856d6);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.3);
  border: 3px solid var(--bg-card);
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 600;
  color: white;
}

.user-name-lg {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.user-role-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.user-role-badge.member {
  background: rgba(0, 122, 255, 0.1);
  color: #007aff;
}

.user-role-badge.admin {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
}

.profile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.profile-nav-link:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}

.profile-nav-link.active {
  background: linear-gradient(135deg,
      rgba(0, 122, 255, 0.1),
      rgba(88, 86, 214, 0.1));
  color: #007aff;
  font-weight: 600;
}

.profile-nav-link.danger {
  color: #ff3b30;
}

.profile-nav-link.danger:hover {
  background: rgba(255, 59, 48, 0.1);
}

.nav-icon-gif {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

.profile-content {
  flex: 1;
  min-width: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.purple {
  background: linear-gradient(135deg,
      rgba(175, 82, 222, 0.15),
      rgba(175, 82, 222, 0.05));
}

.stat-icon.blue {
  background: linear-gradient(135deg,
      rgba(0, 122, 255, 0.15),
      rgba(0, 122, 255, 0.05));
}

.stat-icon.green {
  background: linear-gradient(135deg,
      rgba(52, 199, 89, 0.15),
      rgba(52, 199, 89, 0.05));
  color: #34c759;
}

.stat-icon img {
  width: 26px;
  height: 26px;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Dashboard Section */
.dashboard-section {
  background: var(--bg-card);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.03);
  animation: fadeInUp 0.4s ease-out;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.section-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.section-header h3 img {
  width: 22px;
  height: 22px;
}

/* Data Table */
.table-responsive {
  overflow-x: auto;
  margin: -0.25rem;
  padding: 0.25rem;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.data-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  text-align: left;
  font-weight: 600;
  border: none;
}

.data-table td {
  background: var(--bg-input);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border: none;
}

.data-table tbody tr {
  transition: transform 0.15s ease;
}

.data-table tbody tr:hover {
  transform: scale(1.01);
}

.data-table tbody tr:hover td {
  background: rgba(0, 122, 255, 0.05);
}

.data-table td:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.data-table td:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* History Cards Grid */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.history-card {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.history-card:hover {
  border-color: rgba(0, 122, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.08);
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.history-header strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.history-header .badge {
  background: rgba(0, 122, 255, 0.1);
  color: #007aff;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}

.history-body {
  margin-bottom: 0.75rem;
}

.history-body .text-sm {
  font-size: 0.8rem;
}

.history-body .text-secondary {
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.history-body .font-medium {
  color: var(--text-primary);
  font-weight: 500;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: var(--bg-input);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state .empty-icon svg {
  width: 28px;
  height: 28px;
  opacity: 0.5;
}

.empty-state h4 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.85rem;
}

/* Profile Responsive */
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .profile-container {
    flex-direction: column;
    gap: 1rem;
    margin: 1rem auto;
  }

  .profile-sidebar {
    width: 100%;
    min-width: auto;
    position: static;
    padding: 1.25rem;
  }

  .user-brief {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    padding-bottom: 1rem;
  }

  .user-avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
    margin: 0;
  }

  .user-name-lg {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }

  .profile-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .profile-nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .nav-divider {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .dashboard-section {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .grid-cards {
    grid-template-columns: 1fr;
  }

  .phone-row {
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 480px) {
  .profile-container {
    padding: 0 0.75rem;
  }

  .profile-nav-link span {
    display: none;
  }

  .history-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ========================================
   Contact Page
======================================== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 600px;
  box-shadow: var(--shadow-xl);
}

@media (max-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

.contact-info-card {
  background: var(--bg-surface);
  padding: var(--space-xl);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-color);
}

.text-white {
  color: var(--text-primary) !important;
}

.text-white-op-70 {
  color: var(--text-secondary);
}

.contact-details {
  margin-top: var(--space-xl);
  flex: 1;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.detail-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.detail-text {
  display: flex;
  flex-direction: column;
}

.detail-text .label {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.detail-text .value {
  font-size: var(--font-size-md);
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}

.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

.social-btn {
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary) !important;
  transition: all 0.2s ease;
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
}

.social-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-form-card {
  padding: var(--space-xl);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

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

.input-wrapper.textarea-wrapper {
  align-items: flex-start;
}

.input-wrapper.textarea-wrapper .input-icon {
  margin-top: 12px;
}

/* Success Screen */
.success-screen {
  text-align: center;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

/* ========================================
   Privacy Page
======================================== */
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

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

.card-icon-wrapper {
  width: 48px;
  height: 48px;
  background: var(--bg-input);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.bg-gradient {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-input));
  border: 1px solid var(--border-color);
}

.bg-primary-soft {
  background: rgba(99, 102, 241, 0.1);
  display: inline-flex;
  padding: 1rem;
  border-radius: 50%;
}

/* ========================================
   Utility Classes
======================================== */
.phone-row {
  display: flex;
  gap: 1rem;
}

.phone-row>div {
  flex: 1;
}

hr.my-lg {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 1.5rem 0;
}

h4.mb-md {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.mt-md {
  margin-top: 1rem;
}

.mb-lg {
  margin-bottom: 1.5rem;
}

/* ========================================
   Dark Theme Fixes
======================================== */

/* Okey Mod Butonları - Koyu tema yazı rengi */
[data-theme="dark"] .mode-title {
  color: #ffffff;
}

/* Turnuva Modal - Koyu tema oyuncu isimleri */
[data-theme="dark"] .match-player-btn .player-name {
  color: #ffffff;
}

/* ========================================
   Navigation Glow Effect
======================================== */
.nav-pill.active {
  background: transparent;
  color: var(--color-primary);
  box-shadow: 0 0 15px rgba(0, 122, 255, 0.5), 0 0 30px rgba(0, 122, 255, 0.3);
  border: 1px solid rgba(0, 122, 255, 0.5);
}

[data-theme="dark"] .nav-pill.active {
  background: transparent;
  color: var(--color-primary);
  box-shadow: 0 0 20px rgba(0, 122, 255, 0.6), 0 0 40px rgba(0, 122, 255, 0.3);
  border: 1px solid rgba(0, 122, 255, 0.6);
}

/* Butonlar için glow efekti */
.btn-primary {
  box-shadow: 0 0 10px rgba(0, 122, 255, 0.4);
  transition: all var(--transition);
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(0, 122, 255, 0.6), 0 0 40px rgba(0, 122, 255, 0.3);
}

/* Aktif mode butonları için glow */
.mode-btn.active {
  box-shadow: 0 0 15px rgba(0, 122, 255, 0.4), 0 0 30px rgba(0, 122, 255, 0.2);
}

/* Match player seçili glow */
.match-player-btn.selected {
  box-shadow: 0 0 15px rgba(175, 82, 222, 0.5), 0 0 30px rgba(175, 82, 222, 0.3);
}

/* ========================================
   Mobile Responsive - Comprehensive
======================================== */

/* Mobile Header - Under 900px */
@media (max-width: 900px) {
  .header-centered {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    border-radius: 0;
    height: 60px;
    padding: 0 var(--space-sm);
    gap: 2px;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .header-centered::-webkit-scrollbar {
    display: none;
  }

  .header-logo {
    padding: 0 var(--space-sm);
    margin-right: var(--space-xs);
    flex-shrink: 0;
    border-right: none;
  }

  .header-logo-icon {
    width: 28px;
    height: 28px;
  }

  .header-logo-icon .logo-gif {
    width: 28px;
    height: 28px;
  }

  .nav-pill {
    padding: var(--space-xs) var(--space-sm);
    flex-shrink: 0;
  }

  .nav-pill span {
    display: none;
  }

  .nav-icon-gif {
    width: 20px;
    height: 20px;
  }

  .header-theme-switcher {
    flex-shrink: 0;
    padding: 2px;
    gap: 2px;
  }

  .theme-btn {
    width: 32px;
    height: 32px;
  }

  .main {
    padding-top: calc(60px + var(--space-lg));
  }
}

/* Mobile - Under 768px */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  /* Container */
  .container {
    padding: 0 var(--space-md);
  }

  /* Hero */
  .hero {
    padding: var(--space-xl) 0;
  }

  .hero-title {
    font-size: var(--font-size-2xl);
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
  }

  /* Buttons in Hero */
  .hero .btn-lg {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
  }

  .btn-icon-gif {
    width: 20px;
    height: 20px;
  }

  /* Section */
  .section-title {
    font-size: var(--font-size-xl);
  }

  .section-subtitle {
    font-size: var(--font-size-sm);
  }

  /* Tools Grid */
  .tools-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .tool-card {
    padding: var(--space-md);
  }

  .tool-icon-wrapper,
  .tool-icon-gif-wrapper {
    width: 40px;
    height: 40px;
  }

  .tool-icon-gif {
    width: 32px;
    height: 32px;
  }

  .tool-title {
    font-size: var(--font-size-base);
  }

  .tool-desc {
    font-size: var(--font-size-xs);
  }

  /* Features Grid */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .feature-item {
    padding: var(--space-md);
  }

  /* Auth Pages */
  .auth-container {
    padding: var(--space-md);
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: flex-start;
  }

  .auth-card {
    padding: var(--space-lg);
    width: 100%;
    max-width: 100%;
  }

  .auth-title {
    font-size: var(--font-size-xl);
  }

  /* Form Elements */
  .form-input,
  .form-select {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-base);
  }

  .input-icon-left {
    left: var(--space-sm);
  }

  .form-input.has-icon-left {
    padding-left: calc(var(--space-xl) + var(--space-xs));
  }

  /* Profile Page */
  .profile-container {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .profile-sidebar {
    width: 100%;
    position: relative;
    top: 0;
  }

  .profile-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: var(--space-xs);
    padding-bottom: var(--space-sm);
    scrollbar-width: none;
  }

  .profile-nav::-webkit-scrollbar {
    display: none;
  }

  .profile-nav-link {
    flex-shrink: 0;
    padding: var(--space-sm) var(--space-md);
    white-space: nowrap;
    font-size: var(--font-size-xs);
  }

  .nav-divider {
    display: none;
  }

  .profile-content {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .stat-card {
    flex-direction: row;
    padding: var(--space-md);
  }

  /* Data Tables */
  .data-table {
    font-size: var(--font-size-xs);
  }

  .data-table th,
  .data-table td {
    padding: var(--space-xs) var(--space-sm);
  }

  /* Cards */
  .card {
    padding: var(--space-md);
  }

  .dashboard-section {
    padding: var(--space-md);
  }

  .section-header h3 {
    font-size: var(--font-size-base);
  }

  /* Okey Setup */
  .mode-selection {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .mode-btn {
    padding: var(--space-md);
  }

  .players-grid,
  .teams-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  /* Score Table */
  .score-table-wrapper {
    overflow-x: auto;
  }

  .score-table {
    min-width: 400px;
  }

  /* Contact Page */
  .contact-wrapper {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .contact-info-card,
  .contact-form-card {
    width: 100%;
  }

  /* Privacy Page */
  .privacy-grid {
    grid-template-columns: 1fr;
  }

  .container-md {
    max-width: 100%;
  }

  /* Modals */
  .modal-content,
  .match-modal-content {
    width: 95%;
    max-width: 95%;
    padding: var(--space-lg);
    margin: var(--space-md);
  }

  .match-players {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .match-player-btn {
    width: 100%;
  }

  .vs-text {
    display: none;
  }

  /* Tournament */
  .bracket-size-buttons {
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .bracket-size-btn {
    flex: 1;
    min-width: 80px;
  }

  .bracket-container {
    overflow-x: auto;
    padding-bottom: var(--space-md);
  }

  /* Raffle */
  .raffle-input-section textarea {
    min-height: 100px;
  }

  .winners-count-section {
    flex-direction: column;
    gap: var(--space-sm);
  }

  /* Teams */
  .teams-result-grid {
    grid-template-columns: 1fr;
  }

  /* Wheel */
  .wheel-container {
    max-width: 280px;
    max-height: 280px;
  }

  .options-input-list {
    max-height: 200px;
  }
}

/* Extra Small Mobile - Under 480px */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .hero-title {
    font-size: var(--font-size-xl);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .btn-block {
    padding: var(--space-sm) var(--space-md);
  }

  .tool-tags {
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .tool-tag {
    font-size: 10px;
    padding: 2px 6px;
  }

  /* Profile Stats */
  .user-brief {
    padding: var(--space-md);
  }

  .user-avatar-lg {
    width: 48px;
    height: 48px;
    font-size: var(--font-size-lg);
  }

  .user-name-lg {
    font-size: var(--font-size-base);
  }

  /* History Cards */
  .history-card {
    padding: var(--space-sm);
  }

  .grid-cards {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  /* Dice */
  .dice-container {
    gap: var(--space-md);
  }

  .dice {
    width: 60px;
    height: 60px;
  }

  /* Coin */
  .coin-wrapper {
    width: 120px;
    height: 120px;
  }

  /* Alerts */
  .auth-alert {
    padding: var(--space-sm);
    font-size: var(--font-size-xs);
  }
}

/* Landscape Mobile Fix */
@media (max-width: 900px) and (orientation: landscape) {
  .main {
    padding-top: calc(56px + var(--space-md));
  }

  .header-centered {
    height: 50px;
  }

  .hero {
    padding: var(--space-lg) 0;
  }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
  .tool-card:hover {
    transform: none;
  }

  .nav-pill:active {
    transform: scale(0.95);
  }

  .btn:active {
    transform: scale(0.98);
  }

  /* Larger touch targets */
  .nav-pill {
    min-height: 44px;
    min-width: 44px;
  }

  .btn {
    min-height: 44px;
  }

  .form-input,
  .form-select {
    min-height: 44px;
  }
}

/* ========================================
   Hamburger Menu - Mobile Navigation
======================================== */

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Hamburger Button - Hidden on Desktop */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}

.hamburger-btn:hover {
  background: var(--bg-input);
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Hamburger Animation - Open State */
.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Slide Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  max-width: 85%;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-card-solid);
  z-index: 999;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-glass);
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--font-size-base);
}

.mobile-logo .logo-gif {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.menu-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-input);
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
}

.menu-close-btn:hover {
  background: var(--border-color);
}

.menu-close-btn [data-lucide] {
  width: 20px;
  height: 20px;
}

/* Mobile Navigation Links */
.mobile-nav {
  flex: 1;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 500;
  transition: all var(--transition);
}

.mobile-nav-link:hover {
  background: var(--bg-input);
  opacity: 1;
}

.mobile-nav-link.active {
  background: rgba(0, 122, 255, 0.1);
  color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 122, 255, 0.2);
}

.mobile-nav-link .nav-icon-gif {
  width: 28px;
  height: 28px;
}

.mobile-nav-link [data-lucide] {
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
}

.mobile-nav-link span {
  flex: 1;
}

/* Mobile Nav Divider */
.mobile-nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-sm) 0;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
}

.mobile-footer-link {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  text-decoration: none;
}

.mobile-footer-link:hover {
  color: var(--text-primary);
}

/* Mobile Header Adjustments */
@media (max-width: 900px) {

  /* Show hamburger, hide desktop nav */
  .hamburger-btn {
    display: flex;
  }

  .desktop-nav {
    display: none;
  }

  /* Header layout */
  .header-centered {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-md);
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    border-radius: 0;
    gap: var(--space-sm);
  }

  .header-logo {
    border-right: none;
    padding: 0;
    margin: 0;
    flex: 1;
  }

  .header-logo-text {
    display: block;
    font-size: var(--font-size-base);
  }

  .header-theme-switcher {
    margin-left: auto;
  }

  /* Body padding for fixed header */
  .main {
    padding-top: calc(60px + var(--space-lg));
  }
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

/* ========================================
   Coin Flip - Mobile Responsive
======================================== */
@media (max-width: 768px) {

  /* Layout - Stack vertically */
  .coinflip-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-width: 100%;
  }

  /* Coin goes first on mobile */
  .coin-container {
    order: -1;
    padding: var(--space-lg);
    min-height: auto;
  }

  /* Smaller coin on mobile */
  .coin-wrapper {
    margin-bottom: var(--space-lg);
  }

  .coin {
    width: 160px;
    height: 160px;
  }

  /* Flip button */
  .flip-button {
    padding: var(--space-sm) var(--space-xl);
    font-size: var(--font-size-base);
  }

  .flip-icon {
    width: 20px;
    height: 20px;
  }

  /* Result text */
  .result-text {
    font-size: var(--font-size-xl);
    padding: var(--space-sm) var(--space-lg);
  }

  /* Panel adjustments */
  .coinflip-panel {
    width: 100%;
  }

  .coinflip-panel .card {
    padding: var(--space-md);
  }

  /* Panel header */
  .panel-header {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .panel-info {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .panel-icon {
    width: 40px;
    height: 40px;
  }

  /* Flip count buttons */
  .flip-count-section {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
  }

  .flip-count-buttons {
    gap: var(--space-xs);
  }

  .flip-count-btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
  }

  /* Statistics */
  .stats-section {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
  }

  .stats-title {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
  }

  .stats-grid {
    display: flex;
    gap: var(--space-sm);
  }

  .stat-item {
    flex: 1;
    padding: var(--space-sm);
  }

  .stat-value {
    font-size: var(--font-size-xl);
  }

  .stat-label {
    font-size: var(--font-size-xs);
  }

  /* Stats bar */
  .stats-bar {
    height: 8px;
    margin: var(--space-sm) 0;
  }

  .stats-percentages {
    font-size: var(--font-size-xs);
  }

  /* History section */
  .history-section {
    margin-top: var(--space-md);
  }

  .history-header {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .history-title {
    font-size: var(--font-size-sm);
  }

  .history-list {
    max-height: 150px;
    padding: var(--space-sm);
  }

  .history-item {
    padding: var(--space-xs) var(--space-sm);
    gap: var(--space-sm);
    font-size: var(--font-size-xs);
  }

  .history-coin {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  /* Multi result */
  .multi-result {
    margin-top: var(--space-md);
  }

  .multi-summary {
    font-size: var(--font-size-base);
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .multi-coins {
    gap: var(--space-xs);
  }

  .mini-coin {
    width: 28px;
    height: 28px;
    font-size: var(--font-size-xs);
  }
}

/* Extra small mobile */
@media (max-width: 480px) {
  .coin {
    width: 140px;
    height: 140px;
  }

  .flip-button {
    width: 100%;
    max-width: 200px;
  }

  .result-text {
    font-size: var(--font-size-lg);
    padding: var(--space-xs) var(--space-md);
  }

  .stat-value {
    font-size: var(--font-size-lg);
  }
}