/* TikOverlay Dashboard - Dark, Clean, Professional */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #151515;
  --bg-tertiary: #1a1a1a;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border-color: #2a2a2a;
  --accent-color: #3a3a3a;
  --success-color: #af4c4c;
  --error-color: #f44336;
  --connected-color: #2196f3;
  
  /* المتغير الرئيسي للون - غيّر هنا ليتغير في كل مكان */
  --primary-color: #ff0000;
  --primary-color-light: #ff3333;
  --primary-color-dark: #cc0000;
  
  /* ألوان بصيغة rgba */
  --primary-rgba-05: rgba(255, 0, 0, 0.05);
  --primary-rgba-08: rgba(255, 0, 0, 0.08);
  --primary-rgba-10: rgba(255, 0, 0, 0.1);
  --primary-rgba-12: rgba(255, 0, 0, 0.12);
  --primary-rgba-15: rgba(255, 0, 0, 0.15);
  --primary-rgba-18: rgba(255, 0, 0, 0.18);
  --primary-rgba-20: rgba(255, 0, 0, 0.2);
  --primary-rgba-25: rgba(255, 0, 0, 0.25);
  --primary-rgba-30: rgba(255, 0, 0, 0.3);
  --primary-rgba-35: rgba(255, 0, 0, 0.35);
  --primary-rgba-40: rgba(255, 0, 0, 0.4);
  --primary-rgba-50: rgba(255, 0, 0, 0.5);
  --primary-rgba-60: rgba(255, 0, 0, 0.6);
  --primary-rgba-65: rgba(255, 0, 0, 0.65);
  --primary-rgba-80: rgba(255, 0, 0, 0.8);
  
  /* متغيرات قديمة للتوافق */
  --neon-green: var(--primary-color);
  --neon-green-glow: var(--primary-rgba-40);
  --neon-green-dark: var(--primary-rgba-15);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  background-image: 
    radial-gradient(at 20% 10%, var(--primary-rgba-05) 0px, transparent 50%),
    radial-gradient(at 80% 90%, rgba(255, 0, 0, 0.04) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(255, 0, 0, 0.02) 0px, transparent 50%);
  color: var(--text-primary);
  overflow-x: hidden;
  direction: rtl;
  position: relative;
}

/* Logo Background Overlay */
body::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  max-width: 800px;
  max-height: 800px;
  background-image: url('../img/tikoverlay-logo.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}
/* Header - Premium Glassmorphism Design */
.header {
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--primary-rgba-15);
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 75px;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 0 20px var(--primary-rgba-05);
}

/* General Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 10, 10, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-rgba-40), var(--primary-rgba-40));
  border-radius: 5px;
  box-shadow: 0 0 10px var(--primary-rgba-50);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-rgba-60), var(--primary-rgba-60));
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
}

::-webkit-scrollbar-corner {
  background: rgba(10, 10, 10, 0.5);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.header-center {
  display: flex;
  gap: 12px;
  align-items: center;

  justify-content: center;
}

.header-right {
  flex: 1;
  text-align: left;
}

.brand {
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px var(--primary-rgba-30));
  letter-spacing: 0.5px;
  user-select: none;
  transition: filter 0.3s ease;
  direction: ltr;
  unicode-bidi: embed;
}

.brand:hover {
  filter: drop-shadow(0 0 20px var(--primary-rgba-50));
}

/* Ensure each character maintains the gradient */
.brand .char,
.brand .word {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.user-email {
  color: var(--text-secondary);
  font-size: 14px;
}

.btn-logout {
  background: rgba(244, 67, 54, 0.15);
  backdrop-filter: blur(10px);
  color: #ff6b6b;
  border: 1px solid rgba(244, 67, 54, 0.3);
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: rgba(244, 67, 54, 0.25);
  border-color: rgba(244, 67, 54, 0.6);
  box-shadow: 0 0 20px rgba(244, 67, 54, 0.3);
  transform: translateY(-1px);
}

/* Connection Status Indicator in Header */
.connection-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary-rgba-15);
  padding: 8px 14px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.connection-status-indicator .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4444;
  box-shadow: 0 0 10px currentColor;
  transition: all 0.3s ease;
  animation: statusPulse 2s ease-in-out infinite;
}

.connection-status-indicator .status-dot.connected {
  background: #4caf50;
  box-shadow: 0 0 15px #4caf50;
}

.connection-status-indicator .status-dot.connecting {
  background: #ffd700;
  box-shadow: 0 0 15px #ffd700;
  animation: statusPulse 1s ease-in-out infinite;
}

.connection-status-indicator .status-dot.disconnected,
.connection-status-indicator .status-dot.failed {
  background: #ff4444;
  box-shadow: 0 0 10px #ff4444;
  animation: none;
}

.connection-status-indicator .status-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  min-width: 70px;
  text-align: center;
  transition: color 0.3s ease;
}

.connection-status-indicator .status-label.connected {
  color: #4caf50;
}

.connection-status-indicator .status-label.connecting {
  color: #ffd700;
}

.connection-status-indicator .status-label.disconnected,
.connection-status-indicator .status-label.failed {
  color: #ff4444;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.input-tiktok {
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary-rgba-15);
  color: var(--text-primary);
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  width: 160px;
  outline: none;
  transition: all 0.3s ease;
}

.input-tiktok:focus {
  border-color: var(--primary-rgba-60);
  background: rgba(15, 15, 15, 0.8);
  box-shadow: 0 0 0 3px var(--primary-rgba-10), 0 0 20px var(--primary-rgba-20);
}

.btn-connect {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 1px solid var(--primary-rgba-20);
  padding: 11px 26px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  min-width: 130px;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px var(--primary-rgba-10);
}

.btn-connect:hover {
  background: var(--primary-rgba-10);
  border-color: var(--primary-rgba-50);
  box-shadow: 0 0 20px var(--primary-rgba-30);
  transform: translateY(-1px);
}

.btn-connect.connected {
  background: linear-gradient(135deg, var(--primary-rgba-20), var(--primary-rgba-20));
  border-color: var(--neon-green);
  color: var(--primary-color);
  box-shadow: 0 0 25px var(--primary-rgba-40), inset 0 1px 0 var(--primary-rgba-20);
  animation: glowPulse 2s ease-in-out infinite;
}

.btn-connect.connected:hover {
  background: linear-gradient(135deg, var(--primary-rgba-30), var(--primary-rgba-30));
  box-shadow: 0 0 35px var(--primary-rgba-50);
}

/* Loading State for Connect Button */
.btn-connect.loading {
  position: relative;
  pointer-events: none;
  background: rgba(20, 20, 20, 0.8);
  border-color: var(--primary-rgba-30);
  color: var(--text-secondary);
  animation: loadingPulse 1.5s ease-in-out infinite;
}

.btn-connect.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 15px;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes loadingPulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 15px var(--primary-rgba-20);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 25px var(--primary-rgba-30);
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Room Info Display */
.room-info-display {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 16px;
  transition: all 0.2s;
}


.room-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-rgba-50);
  box-shadow: 0 0 15px var(--primary-rgba-30), inset 0 0 10px var(--primary-rgba-10);
  transition: all 0.3s ease;
}

.room-avatar:hover {
  border-color: rgba(255, 0, 0, 0.8);
  box-shadow: 0 0 25px var(--primary-rgba-50);
  transform: scale(1.05);
}

.room-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.room-nickname {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.2;
  text-shadow: 0 0 8px var(--primary-rgba-40);
}

.room-title {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.2;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Container */
.main-container {
  display: flex;
  margin-top: 75px;
  height: calc(100vh - 75px);
  position: relative;
  z-index: 1;
}

/* Sidebar - Modern Glassmorphism Design */
.sidebar {
  width: 85px;
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid var(--primary-rgba-15);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 75px;
  right: 0;
  bottom: 0;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.4), -2px 0 20px var(--primary-rgba-08);
}

.sidebar:hover {
  width: 220px;
}

.nav-menu {
  flex: 1;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  border: 1px solid var(--primary-rgba-10);
  padding: 13px 12px;
  text-align: right;
  cursor: pointer;
  font-size: 14px;
  border-radius: 12px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  min-height: 48px;
}

.nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-rgba-12), var(--primary-rgba-12));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  z-index: -1;
}

.nav-btn:hover::before {
  width: 100%;
}

.nav-btn:hover {
  background: var(--primary-rgba-08);
  border-color: var(--primary-rgba-40);
  color: var(--text-primary);
  transform: translateX(-3px);
  box-shadow: 0 4px 20px var(--primary-rgba-25), 0 0 15px var(--primary-rgba-15);
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--primary-rgba-18), var(--primary-rgba-18));
  border-color: var(--primary-rgba-65);
  color: var(--primary-color-light);
  box-shadow: 0 4px 25px var(--primary-rgba-35), 0 0 20px var(--primary-rgba-20), inset 0 1px 0 var(--primary-rgba-15);
}

.nav-btn.active::before {
  width: 100%;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  min-width: 24px;
  color: var(--primary-color);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 6px var(--primary-rgba-40));
}

.nav-btn:hover .nav-icon {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 0 12px var(--primary-rgba-60));
}

.nav-btn.active .nav-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.8));
  color: var(--primary-color-light);
  animation: iconGlow 2s ease-in-out infinite;
}

.nav-text {
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.sidebar:hover .nav-text {
  opacity: 1;
}

.nav-indicator {
  position: absolute;
  left: 8px;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, var(--primary-color), var(--primary-color-dark));
  border-radius: 2px;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.7), 0 0 5px rgba(255, 0, 0, 0.9);
}

.nav-btn.active .nav-indicator {
  height: 60%;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.9), 0 0 8px var(--primary-color);
}

.sidebar-footer {
  position: relative;
  padding: 8px 12px;
  border-top: 1px solid var(--primary-rgba-15);
  text-align: center;
  overflow: hidden;
  box-shadow: 0 -2px 15px var(--primary-rgba-05);
}

.footer-blur {
  position: absolute;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(15, 15, 15, 0.4));
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 11px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 4px 6px;
    border-radius: 8px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--primary-rgba-10);
    min-width: 10px;
}

.footer-link i {
  font-size: 14px;
  color: var(--primary-color);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 4px var(--primary-rgba-30));
}

.footer-link:hover {
  color: var(--primary-color);
  background: var(--primary-rgba-08);
  border-color: var(--primary-rgba-40);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--primary-rgba-20);
}

.footer-link:hover i {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px var(--primary-rgba-60));
}

.footer-link-text {
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  font-size: 11px;
}

.sidebar:hover .footer-link-text {
  opacity: 1;
}

.version {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--primary-color);
  font-size: 11px;
  font-weight: 500;
  padding: 8px;
  background: var(--primary-rgba-05);
  border: 1px solid var(--primary-rgba-20);
  border-radius: 8px;
  transition: all 0.3s ease;
  text-shadow: 0 0 8px var(--primary-rgba-40);
}

.version:hover {
  background: var(--primary-rgba-10);
  border-color: var(--primary-rgba-40);
  color: var(--primary-color-light);
  box-shadow: 0 0 15px var(--primary-rgba-30);
}

/* Main Content */
.content {
  flex: 1;
  margin-right: 85px;
  padding: 32px;
  overflow-y: auto;
  transition: margin-right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.loading-state {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: var(--text-secondary);
  font-size: 16px;
}

.view {
  max-width: 1400px;
}

.view h2 {
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Card - Glassmorphism Style */
.card {
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--primary-rgba-15);
  border-radius: 16px;
  padding: 28px;
  max-width: 600px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px var(--primary-rgba-08);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--primary-rgba-35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--primary-rgba-15);
}

.card h2 {
  margin-bottom: 24px;
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  filter: drop-shadow(0 0 10px var(--primary-rgba-30));
}

/* Auth Form inside Card */
.auth-step {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.input-field {
  padding: 14px 18px;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid var(--primary-rgba-15);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  direction: ltr;
  text-align: left;
  backdrop-filter: blur(10px);
}

.input-field:focus {
  border-color: var(--primary-rgba-60);
  background: rgba(10, 10, 10, 0.8);
  box-shadow: 0 0 0 3px var(--primary-rgba-10), 0 4px 16px var(--primary-rgba-25), 0 0 15px var(--primary-rgba-15);
}

/* Number input specific styling */
input[type="number"].input-field {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

/* Select input specific styling */
select.input-field {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  cursor: pointer;
}

.btn-primary {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px var(--primary-rgba-35), 0 0 15px var(--primary-rgba-25);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-color-light), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--primary-rgba-50), 0 0 25px var(--primary-rgba-35);
}

.btn-primary:disabled {
  background: var(--text-secondary);
  cursor: not-allowed;
}

.btn-secondary {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--primary-rgba-20);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: var(--primary-rgba-50);
  color: var(--primary-color);
  background: var(--primary-rgba-10);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--primary-rgba-25), 0 0 12px var(--primary-rgba-15);
}

.verify-info {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-align: center;
}

.auth-message {
  font-size: 14px;
  min-height: 20px;
  margin-top: 5px;
  text-align: center;
}

.auth-message.error {
  color: var(--error-color);
}

.auth-message.success {
  color: var(--success-color);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  color: var(--text-secondary);
  font-size: 14px;
}

.info-row .value {
  color: var(--text-primary);
  font-size: 14px;
}

.info-row .status {
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(10px);
  font-size: 13px;
  border: 1px solid rgba(137, 255, 0, 0.15);
}

.info-row .status.connected {
  background: linear-gradient(135deg, var(--primary-rgba-25), var(--primary-rgba-25));
  border-color: var(--neon-green);
  color: var(--primary-color);
  font-weight: 500;
  box-shadow: 0 0 15px var(--primary-rgba-30);
}

.token-box {
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--primary-rgba-15);
  font-family: monospace;
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 400px;
  overflow-x: auto;
  white-space: nowrap;
}

/* Overlays Grid */
.overlays-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
  max-width: 1400px;
}

.overlay-card {
  background: rgba(15, 15, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--primary-rgba-15);
  border-radius: 16px;
  padding: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  animation: cardFadeInUp 0.6s ease-out backwards;
}

.overlay-card:nth-child(1) { animation-delay: 0.05s; }
.overlay-card:nth-child(2) { animation-delay: 0.1s; }
.overlay-card:nth-child(3) { animation-delay: 0.15s; }
.overlay-card:nth-child(4) { animation-delay: 0.2s; }
.overlay-card:nth-child(5) { animation-delay: 0.25s; }
.overlay-card:nth-child(6) { animation-delay: 0.3s; }
.overlay-card:nth-child(7) { animation-delay: 0.35s; }

@keyframes cardFadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.overlay-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-color-dark));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay-card:hover {
  border-color: var(--primary-rgba-40);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 30px var(--primary-rgba-20);
  transform: translateY(-4px);
}

.overlay-card:hover::before {
  opacity: 1;
}

.overlay-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  padding: 16px 20px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay-card h3 i {
  color: var(--primary-color);
  filter: drop-shadow(0 0 8px var(--primary-rgba-40));
  font-size: 16px;
  margin-left: 8px;
}

.overlay-url-container {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border-color);
}

.overlay-url {
  flex: 1;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid var(--primary-rgba-20);
  color: var(--text-secondary);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-family: 'Consolas', 'Monaco', monospace;
  direction: ltr;
  text-align: left;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.overlay-url:hover {
  border-color: var(--primary-rgba-40);
  background: rgba(10, 10, 10, 0.95);
}

.btn-copy {
  background: var(--primary-rgba-10);
  backdrop-filter: blur(10px);
  color: var(--primary-color);
  border: 1px solid var(--primary-rgba-30);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 70px;
}

.btn-copy:hover {
  background: var(--primary-rgba-20);
  border-color: var(--primary-rgba-60);
  box-shadow: 0 0 20px var(--primary-rgba-30);
  transform: translateY(-1px);
}

.btn-copy.copied {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  border-color: var(--primary-color);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 25px var(--primary-rgba-50), 0 0 15px var(--primary-rgba-40);
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* أزرار الإعدادات في Overlay Cards */
.btn-settings {
  background: var(--primary-rgba-15) !important;
  backdrop-filter: blur(10px);
  color: var(--primary-color) !important;
  border: 1px solid var(--primary-rgba-30) !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  cursor: pointer;
  font-size: 13px !important;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

.btn-settings:hover {
  background: var(--primary-rgba-25) !important;
  border-color: var(--primary-rgba-60) !important;
  box-shadow: 0 0 20px var(--primary-rgba-30);
  transform: translateY(-1px);
}

.btn-reset {
  background: rgba(239, 68, 68, 0.15) !important;
  backdrop-filter: blur(10px);
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  cursor: pointer;
  font-size: 13px !important;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-reset:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

/* Overlay Actions Bar */
.overlay-actions-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}

.overlay-url-container {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Theme Note (Warning/Info boxes) */
.theme-note {
  display: none;
  margin-top: 10px;
  padding: 12px;
  background: rgba(255, 183, 77, 0.1);
  border-radius: 8px;
  border-left: 3px solid #ffb74d;
  animation: slideDown 0.3s ease;
}

.theme-note.active {
  display: block;
}

.theme-note p {
  color: #ffb74d;
  font-size: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-note i {
  flex-shrink: 0;
}

/* Settings Description */
.settings-description {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.5;
}

.settings-description i {
  margin-top: 2px;
  flex-shrink: 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hidden Utility Class */
.hidden {
  display: none !important;
}

/* Ranks Preview */
.ranks-preview {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.ranks-preview strong {
  color: var(--primary-color);
  font-size: 16px;
  margin: 0 4px;
  font-weight: 700;
}

.overlay-preview {
  background: #000;
  border: none;
  border-radius: 0;
  height: 280px;
  overflow: hidden;
  position: relative;
}

.overlay-preview::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid var(--primary-rgba-20);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: previewLoader 0.8s linear infinite;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.overlay-preview.loaded::before {
  opacity: 0;
}

.overlay-preview iframe {
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.overlay-preview.loaded iframe {
  opacity: 1;
}

@keyframes previewLoader {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.overlay-preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--primary-rgba-30), transparent);
  opacity: 0.5;
  z-index: 3;
}

.overlay-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Top Likes View */
.top-likes-container {
  margin-top: 20px;
}

.overlay-card.full-width {
  max-width: 100%;
}

/* Medium width card for overlay previews (reduced width, centered) */
.overlay-card.medium-width {
  max-width: 900px;

}

.overlay-card.full-width {
  grid-column: 1 / -1;
}

.overlay-preview.large {
  height: 500px;
}



/* =============================================================================
   NO WORKERS BANNER ANIMATION
   ============================================================================= */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    max-height: 200px;
  }
  to {
    opacity: 0;
    max-height: 0;
  }
}

/* Platform Input Container Animations */
@keyframes platformInputSlideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    max-height: 100px;
    transform: translateY(0);
  }
}

@keyframes platformInputSlideUp {
  from {
    opacity: 1;
    max-height: 100px;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
}

.platform-input-container {
  overflow: hidden;
  transition: all 0.3s ease;
}

#no-workers-banner {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =============================================================================
   VIEW MANAGER ANIMATIONS - Smooth transitions between views
   ============================================================================= */

/* Enter animation - fade in + slide up */
.view-enter {
  animation: viewEnter 0.3s ease-out;
}

@keyframes viewEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Exit animation - fade out + slide up */
.view-exit {
  animation: viewExit 0.3s ease-in;
}

@keyframes viewExit {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Optimize animations for better performance */
.view {
  will-change: opacity, transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Loading state for views */
.view-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  opacity: 0.6;
}

.view-loading::after {
  content: "جاري التحميل...";
  font-size: 18px;
  color: var(--text-secondary);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* =============================================================================
   Toast Notifications - نظام إشعارات موحد بتصميم زجاجي
   ============================================================================= */

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column-reverse; /* الأحدث في الأسفل */
  gap: 12px;
  pointer-events: none;
  max-width: 420px;
}

.toast {
  /* تأثير زجاجي - Glassmorphism */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  
  color: #ffffff;
  padding: 18px 22px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  max-width: 420px;
  pointer-events: all;
  animation: toastSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* خط ملون على الجانب الأيمن */
.toast::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--toast-accent, #667eea), var(--toast-accent-end, #764ba2));
  box-shadow: 0 0 10px var(--toast-accent, #667eea);
}

/* تأثير الضوء عند التمرير */
.toast:hover {
  transform: translateX(-5px) scale(1.02);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.12);
}

/* أنواع Toast مع ألوان مميزة */
.toast.success {
  --toast-accent: #4ade80;
  --toast-accent-end: #22c55e;
}

.toast.error {
  --toast-accent: #f87171;
  --toast-accent-end: #ef4444;
}

.toast.warning {
  --toast-accent: #fbbf24;
  --toast-accent-end: #f59e0b;
}

.toast.info {
  --toast-accent: #60a5fa;
  --toast-accent-end: #3b82f6;
}

/* أيقونة Toast */
.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.toast.success .toast-icon { color: #4ade80; }
.toast.error .toast-icon { color: #f87171; }
.toast.warning .toast-icon { color: #fbbf24; }
.toast.info .toast-icon { color: #60a5fa; }

/* نص Toast */
.toast-message {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  direction: rtl;
  text-align: right;
}

/* زر الإغلاق */
.toast-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* رسوم متحركة للدخول */
@keyframes toastSlideIn {
  0% {
    transform: translateX(450px) scale(0.8);
    opacity: 0;
  }
  60% {
    transform: translateX(-10px) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

/* رسوم متحركة للخروج */
.toast.hiding {
  animation: toastSlideOut 0.3s cubic-bezier(0.6, 0.04, 0.98, 0.335) forwards;
}

@keyframes toastSlideOut {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(450px) scale(0.8);
    opacity: 0;
  }
}

/* شريط تقدم تلقائي */
.toast-progress {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--toast-accent, #667eea));
  transform-origin: right;
  animation: toastProgress linear forwards;
}

@keyframes toastProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* =============================================================================
   نافذة التأكيد بتصميم زجاجي (Confirm Modal)
   ============================================================================= */

.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(20, 20, 40, 0.9) 100%);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.confirm-modal {
  background: linear-gradient(145deg, rgba(50, 50, 70, 0.98) 0%, rgba(35, 35, 55, 0.98) 100%);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.7),
    0 10px 30px rgba(102, 126, 234, 0.15),
    inset 0 1px 3px rgba(255, 255, 255, 0.15),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3);
  border-radius: 24px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

@keyframes modalSlideIn {
  0% {
    transform: scale(0.85) translateY(40px);
    opacity: 0;
    filter: blur(4px);
  }
  60% {
    transform: scale(1.02) translateY(-2px);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}

/* خلفية متحركة للـ modal */
.confirm-modal::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 40%, transparent 70%);
  animation: rotateBackground 12s linear infinite;
  pointer-events: none;
  opacity: 0.8;
}

@keyframes rotateBackground {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.confirm-modal-content {
  position: relative;
  z-index: 1;
}

.confirm-modal-icon {
  font-size: 64px;
  text-align: center;
  margin-bottom: 24px;
  filter: drop-shadow(0 6px 20px rgba(248, 113, 113, 0.4));
  animation: iconPulse 2s ease-in-out infinite;
  transform-origin: center;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.confirm-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 16px;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.3px;
}

.confirm-modal-message {
  font-size: 17px;
  color: #c8c8d0;
  text-align: center;
  line-height: 1.7;
  margin-bottom: 32px;
  direction: rtl;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.confirm-modal-buttons {
  display: flex;
  gap: 12px;
  direction: rtl;
}

.confirm-modal-btn {
  flex: 1;
  padding: 16px 28px;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.confirm-modal-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.confirm-modal-btn:hover::before {
  width: 350px;
  height: 350px;
}

.confirm-modal-btn:active {
  transform: translateY(0) scale(0.97);
}

.confirm-modal-btn span {
  position: relative;
  z-index: 1;
}

.confirm-modal-btn-confirm {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  color: white;
  border: 1.5px solid rgba(248, 113, 113, 0.4);
  box-shadow: 
    0 6px 20px rgba(248, 113, 113, 0.35),
    0 3px 10px rgba(220, 38, 38, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

.confirm-modal-btn-confirm:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 8px 28px rgba(248, 113, 113, 0.45),
    0 5px 15px rgba(220, 38, 38, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
  border-color: rgba(248, 113, 113, 0.6);
}

.confirm-modal-btn-cancel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  color: #f0f0f0;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.confirm-modal-btn-cancel:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 6px 18px rgba(0, 0, 0, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

/* =============================================================================
   Theme Settings System
   ============================================================================= */

/* Settings Button */
.btn-settings {
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
}

.btn-settings:hover {
  background: #5a67d8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-settings:active {
  transform: translateY(0);
}

/* Theme Settings Modal - Optimized for Fast Performance */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* keep modal above the overlay */
  z-index: 10001;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-out;
  /* Performance optimization */
  transform: translateZ(0);
  will-change: opacity;
}

.modal-overlay {
  display: none;
  position: fixed;
  /* cover the full viewport so nothing remains visible behind the modal */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* sit above page content */
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-out;
  /* Performance optimization */
  transform: translateZ(0);
  will-change: opacity;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--primary-rgba-25);
  border-radius: 20px;
  max-width: 650px;
  width: 92%;
  max-height: 85vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px var(--primary-rgba-15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
  animation: modalSlideIn 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: all;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Performance optimization: hardware acceleration */
  transform: translateZ(0);
  will-change: transform, opacity;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .modal-content {
    animation: none;
  }
  
  .modal,
  .modal-overlay {
    transition: none;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.15s ease, background 0.15s ease;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--accent-color);
  transform: rotate(45deg);
}

.modal-body {
  padding: 28px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  /* Performance optimization for smooth scrolling */
  -webkit-overflow-scrolling: touch;
  contain: layout style paint;
}

/* Settings Sections في الـ Modals */
.settings-section {
  margin-bottom: 20px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.settings-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transition: left 0.6s ease;
}

.settings-section:hover::before {
  left: 100%;
}

.settings-section:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--primary-rgba-20);
  transform: translateX(-2px);
  box-shadow: 4px 0 12px var(--primary-rgba-10);
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.settings-label i {
  color: var(--primary-color);
  font-size: 16px;
  width: 20px;
  text-align: center;
  filter: drop-shadow(0 0 4px var(--primary-rgba-30));
}

.settings-label span {
  margin-left: auto;
  padding: 4px 12px;
  background: var(--primary-rgba-15);
  border: 1px solid var(--primary-rgba-25);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 45px;
  text-align: center;
  font-family: 'Consolas', 'Monaco', monospace;
  box-shadow: 0 0 10px var(--primary-rgba-20);
}

/* Sliders في الإعدادات */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: all 0.3s ease;
  margin: 8px 0;
}

.slider:hover {
  background: rgba(255, 255, 255, 0.15);
}

.slider + div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
  opacity: 0.7;
  font-weight: 500;
}

.slider + div span {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.slider:hover + div span {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  cursor: pointer;
  box-shadow: 0 0 15px var(--primary-rgba-50), 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 25px var(--primary-rgba-60), 0 3px 12px rgba(0, 0, 0, 0.5);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  cursor: pointer;
  border: none;
  box-shadow: 0 0 15px var(--primary-rgba-50), 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 25px var(--primary-rgba-60), 0 3px 12px rgba(0, 0, 0, 0.5);
}

/* Select Dropdowns في الإعدادات */
.settings-section select.input-field {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid var(--primary-rgba-20);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.settings-section select.input-field:hover {
  border-color: var(--primary-rgba-40);
  background: rgba(10, 10, 10, 0.8);
}

.settings-section select.input-field:focus {
  border-color: var(--primary-rgba-60);
  box-shadow: 0 0 0 3px var(--primary-rgba-10), 0 4px 16px var(--primary-rgba-20);
}

/* Color Inputs */
.settings-section input[type="color"] {
  background: rgba(10, 10, 10, 0.6);
  border: 2px solid var(--primary-rgba-20);
  border-radius: 10px;
  padding: 4px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 50px;
}

.settings-section input[type="color"]:hover {
  border-color: var(--primary-rgba-40);
  box-shadow: 0 0 20px var(--primary-rgba-25);
  transform: scale(1.02);
}

.settings-section input[type="color"]:focus {
  outline: none;
  border-color: var(--primary-rgba-60);
  box-shadow: 0 0 30px var(--primary-rgba-35), 0 0 0 4px var(--primary-rgba-10);
}

/* Checkboxes */
.settings-section input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--primary-rgba-30);
  border-radius: 6px;
  background: rgba(10, 10, 10, 0.6);
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-section input[type="checkbox"]:hover {
  border-color: var(--primary-rgba-50);
  background: rgba(10, 10, 10, 0.8);
  box-shadow: 0 0 15px var(--primary-rgba-20);
}

.settings-section input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  border-color: var(--primary-color);
  box-shadow: 0 0 20px var(--primary-rgba-40), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}


.settings-section input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-rgba-15);
}

/* Social Platforms Container */
#socialPlatformsContainer .settings-section {
  padding: 16px;
  margin-bottom: 16px;
}

#socialPlatformsContainer .settings-section:last-child {
  margin-bottom: 0;
}

/* Checkbox + Label Container */
.settings-section > div:has(input[type=\"checkbox\"]) {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.settings-section label[for*=\"firework\"],
.settings-section label[for*=\"heart\"],
.settings-section label[for*=\"sound\"] {
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  user-select: none;
  transition: color 0.2s ease;
}

.settings-section label[for*=\"firework\"]:hover,
.settings-section label[for*=\"heart\"]:hover,
.settings-section label[for*=\"sound\"]:hover {
  color: var(--primary-color);
}

.theme-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.theme-option {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  background: var(--bg-tertiary);
  overflow: hidden;
}

.theme-option:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--primary-rgba-20);
}

.theme-option input[type="radio"] {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  z-index: 2;
  accent-color: var(--primary-color);
}

.theme-option input[type="radio"]:checked ~ label {
  border-color: var(--primary-color);
}

.theme-option label {
  display: block;
  cursor: pointer;
  padding: 12px;
}

.theme-preview {
  width: 100%;
  height: 100px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.theme-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theme-preview-placeholder {
  font-size: 2.5rem;
  color: var(--text-secondary);
  opacity: 0.3;
}

.theme-info h4 {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
}

.theme-info p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Visible Ranks Selector */
.visible-ranks-selector h4 {
  font-size: 1rem;
  font-weight: 600;
}

.ranks-input {
  width: 80px;
  padding: 10px 16px;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transition: all 0.3s ease;
  text-align: center;
  font-weight: 600;
}

.ranks-input:hover {
  border-color: #667eea;
}

.ranks-input:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Remove spinner arrows from number input */
.ranks-input::-webkit-outer-spin-button,
.ranks-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ranks-input[type=number] {
  -moz-appearance: textfield;
  -webkit-appearance: textfield;
  appearance: textfield;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.btn-primary,
.btn-secondary {
  padding: 11px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  color: #ffffff;
  box-shadow: 0 4px 16px var(--primary-rgba-30);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-color-light), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-rgba-40);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Scrollbar Styling for Modal */
.modal-content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
  background: rgba(10, 10, 10, 0.4);
}

.modal-content::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background: var(--primary-rgba-30);
  border-radius: 4px;
  box-shadow: 0 0 8px var(--primary-rgba-40);
}

.modal-content::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--primary-rgba-50);
  box-shadow: 0 0 12px var(--primary-rgba-60);
}
/* ==================== ACTIONS VIEW STYLES ==================== */

/* Actions Container */
.actions-container {
  padding: 0;
}

/* Screens Grid */
.screens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.screen-card {
  background: rgba(20, 20, 20, 0.5);
  backdrop-filter: blur(15px);
  border: 1px solid var(--primary-rgba-15);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  transition: all 0.3s ease;
}

.screen-card:hover {
  border-color: var(--primary-rgba-30);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--primary-rgba-10);
  transform: translateY(-2px);
}

.screen-card h4 {
  color: var(--primary-color);
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  text-shadow: 0 0 8px var(--primary-rgba-30);
}

.screen-link-input {
  width: 100%;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary-rgba-15);
  color: var(--text-secondary);
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.screen-link-input:focus {
  outline: none;
  border-color: var(--primary-rgba-50);
  box-shadow: 0 0 15px var(--primary-rgba-20);
}

.btn-copy {
  background: var(--accent-color);
  color: var(--text-primary);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-copy:hover {
  background: var(--border-color);
  transform: translateY(-1px);
}

/* Create Action Button */
.btn-create-action {
  padding: 16px 48px;
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-rgba-18), var(--primary-rgba-18));
  border: 2px solid var(--primary-rgba-40);
  border-radius: 12px;
  color: var(--primary-color);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px var(--primary-rgba-25), 0 0 15px var(--primary-rgba-10);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
}

.btn-create-action i {
  font-size: 20px;
}

.btn-create-action::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary-rgba-20), transparent);
  transition: left 0.5s ease;
}

.btn-create-action:hover::before {
  left: 100%;
}

.btn-create-action:hover {
  background: linear-gradient(135deg, var(--primary-rgba-25), var(--primary-rgba-25));
  border-color: var(--primary-rgba-60);
  box-shadow: 0 6px 30px var(--primary-rgba-35), 0 0 25px var(--primary-rgba-20);
  transform: translateY(-2px);
}

/* Actions List Container */
#actionsList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

/* Action Item - Compact Card Design */
.action-item {
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.8), rgba(15, 15, 15, 0.6));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--primary-rgba-15);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 0 8px var(--primary-rgba-05);
  animation: fadeInUp 0.4s ease-out backwards;
}

/* Stagger animation for multiple items */
.action-item:nth-child(1) { animation-delay: 0.05s; }
.action-item:nth-child(2) { animation-delay: 0.1s; }
.action-item:nth-child(3) { animation-delay: 0.15s; }
.action-item:nth-child(4) { animation-delay: 0.2s; }
.action-item:nth-child(5) { animation-delay: 0.25s; }
.action-item:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animate fade-in-up class for smooth loading */
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out backwards;
}

/* Subtle gradient overlay */
.action-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, var(--primary-rgba-05), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.action-item:hover::before {
  opacity: 1;
}

.action-item:hover {
  border-color: var(--primary-rgba-30);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-rgba-10);
  transform: translateY(-1px);
}

/* Left accent line - Compact */
.action-item::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, var(--primary-color), var(--primary-color-dark));
  border-radius: 3px 0 0 3px;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--primary-rgba-50);
}

.action-item:hover::after {
  height: 100%;
}

/* Status indicator for enabled/disabled state */
.action-item[data-enabled="true"]::after {
  height: 100%;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 15px var(--primary-rgba-60);
  }
  50% {
    box-shadow: 0 0 25px var(--primary-rgba-80), 0 0 40px var(--primary-rgba-40);
  }
}

/* Action Header - New Layout */
.action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--primary-rgba-15);
  gap: 12px;
}

.action-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.action-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--primary-rgba-12);
  border: 1px solid var(--primary-rgba-30);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-color);
  text-shadow: 0 0 6px var(--primary-rgba-30);
  white-space: nowrap;
}

.action-type-badge i {
  font-size: 14px;
}

.action-main-detail {
  font-size: 13px;
  font-weight: 600;
}

/* Action Content - New Layout */
.action-content {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

/* Action Info Section */
.action-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Action Details Table */
.action-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.action-details-table tr {
  border-bottom: 1px solid var(--primary-rgba-08);
  transition: background 0.2s ease;
}

.action-details-table tr:last-child {
  border-bottom: none;
}

.action-details-table tr:hover {
  background: var(--primary-rgba-05);
}

.action-details-table td {
  padding: 6px 8px;
  vertical-align: middle;
}

.detail-label {
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  width: 85px;
  text-align: right;
}

.detail-label i {
  margin-left: 4px;
  font-size: 11px;
}

.detail-value {
  color: var(--text-primary);
  text-align: right;
}

/* Toggle Switch - Compact Design */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 28px;
  border: 2px solid var(--primary-rgba-15);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-slider:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary-rgba-25);
}

.toggle-slider:before {
  position: absolute;
  content: "";
    height: 20px;
    width: 20px;
    left: -1px;
    bottom: -1px;
  background: linear-gradient(145deg, #e0e0e0, #ffffff);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
}

input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--primary-rgba-35), var(--primary-rgba-35));
  border-color: var(--primary-color);
  box-shadow: 0 0 20px var(--primary-rgba-40), inset 0 1px 0 var(--primary-rgba-20), inset 0 -2px 8px rgba(0, 0, 0, 0.3);
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
  background: linear-gradient(145deg, var(--primary-color-light), var(--primary-color));
  box-shadow: 0 0 15px var(--primary-rgba-60), 0 2px 10px rgba(0, 0, 0, 0.4);
}

input:checked + .toggle-slider:hover {
  background: linear-gradient(135deg, var(--primary-rgba-40), var(--primary-rgba-40));
  box-shadow: 0 0 25px var(--primary-rgba-50), inset 0 1px 0 var(--primary-rgba-20), inset 0 -2px 8px rgba(0, 0, 0, 0.3);
}

/* Action Buttons Container - Vertical */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 90px;
  flex-shrink: 0;
}

.action-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.action-buttons button i {
  font-size: 11px;
}

/* Delete Button - Compact */
.btn-delete {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.12), rgba(244, 67, 54, 0.08));
  backdrop-filter: blur(10px);
  color: #ff6b6b;
  border: 1px solid rgba(244, 67, 54, 0.3);
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 6px rgba(244, 67, 54, 0.15);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.btn-delete::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(244, 67, 54, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.btn-delete:hover::before {
  width: 200px;
  height: 200px;
}

.btn-delete:hover {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.25), rgba(244, 67, 54, 0.15));
  border-color: rgba(244, 67, 54, 0.6);
  box-shadow: 0 4px 20px rgba(244, 67, 54, 0.3), 0 0 15px rgba(244, 67, 54, 0.2);
  transform: translateY(-2px);
  color: #ff8a80;
}

/* Test Button - Compact */
.btn-test {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.12), rgba(33, 150, 243, 0.08));
  backdrop-filter: blur(10px);
  color: #64b5f6;
  border: 1px solid rgba(33, 150, 243, 0.3);
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 6px rgba(33, 150, 243, 0.15);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.btn-test::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(33, 150, 243, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.btn-test:hover::before {
  width: 200px;
  height: 200px;
}

.btn-test:hover {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.25), rgba(33, 150, 243, 0.15));
  border-color: rgba(33, 150, 243, 0.6);
  box-shadow: 0 4px 20px rgba(33, 150, 243, 0.3), 0 0 15px rgba(33, 150, 243, 0.2);
  transform: translateY(-2px);
  color: #90caf9;
}

/* Edit Button - Compact */
.btn-edit {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.12), rgba(255, 152, 0, 0.08));
  backdrop-filter: blur(10px);
  color: #ffb74d;
  border: 1px solid rgba(255, 152, 0, 0.3);
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 6px rgba(255, 152, 0, 0.15);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-edit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 152, 0, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.btn-edit:hover::before {
  width: 200px;
  height: 200px;
}

.btn-edit:hover {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.25), rgba(255, 152, 0, 0.15));
  border-color: rgba(255, 152, 0, 0.6);
  box-shadow: 0 4px 20px rgba(255, 152, 0, 0.3), 0 0 15px rgba(255, 152, 0, 0.2);
  transform: translateY(-2px);
  color: #ffc107;
}

/* Screens List (New Design) */
.screens-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.screen-row {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.screen-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.screen-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 100px;
  text-align: left;
}

.screen-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.3s;
}

.status-dot.online {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.7), 0 0 6px rgba(255, 0, 0, 0.9);
  animation: pulse 2s infinite;
}

.status-dot.offline {
  background: #f44336;
}

.status-dot.stale {
  background: #ff9800;
  box-shadow: 0 0 6px rgba(255, 152, 0, 0.5);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.status-text {
  font-size: 14px;
  font-weight: 600;
  transition: color 0.3s;
}

.screen-link-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.screen-link-input-inline {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  text-align: left;
}

.screen-link-input-inline:focus {
  outline: none;
  border-color: var(--accent-color);
}

.btn-copy-inline {
  background: var(--accent-color);
  color: var(--text-primary);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.3s;
}

.btn-copy-inline:hover {
  background: var(--border-color);
  transform: translateY(-1px);
}

.btn-copy-inline.copied {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark)) !important;
  border-color: var(--primary-color) !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 0 25px var(--primary-rgba-50), 0 0 15px var(--primary-rgba-40);
  animation: successPulse 0.6s ease-out;
}

/* Modal Overlay (Portal) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.modal.active,
.modal-overlay.active {
  display: flex;
  opacity: 1;
  /* Force hardware acceleration for smooth performance */
  transform: translateZ(0);
}

/* Color Mode Sections */
#singleColorSection,
#dualColorSection {
  display: none;
}

#singleColorSection.active,
#dualColorSection.active {
  display: block;
}

/* Platform Cards */
.platform-card {
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  background: rgba(10, 10, 10, 0.6);
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.platform-card:hover {
  border-color: var(--primary-rgba-30);
  background: rgba(10, 10, 10, 0.8);
  box-shadow: 0 4px 16px var(--primary-rgba-10);
}

.platform-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.platform-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.platform-icon {
  font-size: 24px;
  width: 24px;
  text-align: center;
}

.platform-label {
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  color: var(--text-primary);
}

.platform-input-container {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.platform-input-container.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: platformInputSlideDown 0.3s ease forwards;
}

.platform-input-container .input-field {
  width: 100%;
  background: rgba(20, 20, 20, 0.8);
}

/* Desktop Disabled Message */
.desktop-disabled-message {
  padding: 70px 20px;
  text-align: center;
  background: rgba(139, 92, 246, 0.1);
  border: 2px dashed rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  color: var(--text-secondary);
}

.desktop-disabled-message .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.desktop-disabled-message .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.desktop-disabled-message .description {
  font-size: 14px;
  color: var(--text-secondary);
}

.desktop-disabled-message .hint {
  font-size: 14px;
  margin-top: 12px;
  color: #8b5cf6;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  color: var(--text-primary);
  font-size: 20px;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

.form-group .input-field {
  width: 100%;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary-rgba-15);
  color: var(--text-primary);
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-group .input-field:focus {
  outline: none;
  border-color: var(--primary-rgba-60);
  box-shadow: 0 0 0 3px var(--primary-rgba-10), 0 4px 16px var(--primary-rgba-20);
}

.form-group .input-field:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-group textarea.input-field {
  resize: vertical;
  font-family: inherit;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;

}

.form-actions button {
  padding: 10px 24px;
  font-size: 14px;
}

/* Animations & Keyframes */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 15px var(--primary-rgba-30);
  }
  50% {
    box-shadow: 0 0 25px var(--primary-rgba-50);
  }
}

@keyframes iconGlow {
  0%, 100% {
    filter: drop-shadow(0 0 6px var(--primary-rgba-40));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.7));
  }
}

/* Page Load Animations */
.header {
  animation: slideInDown 0.6s ease-out;
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sidebar {
  animation: slideInFromRight 0.6s ease-out;
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.nav-btn {
  animation: fadeIn 0.4s ease-out backwards;
}

.nav-btn:nth-child(1) { animation-delay: 0.1s; }
.nav-btn:nth-child(2) { animation-delay: 0.15s; }
.nav-btn:nth-child(3) { animation-delay: 0.2s; }
.nav-btn:nth-child(4) { animation-delay: 0.25s; }
.nav-btn:nth-child(5) { animation-delay: 0.3s; }
.nav-btn:nth-child(6) { animation-delay: 0.35s; }
.nav-btn:nth-child(7) { animation-delay: 0.4s; }
.nav-btn:nth-child(8) { animation-delay: 0.45s; }

.card {
  animation: fadeIn 0.5s ease-out;
}

/* Sidebar Scrollbar */
.nav-menu::-webkit-scrollbar {
  width: 4px;
}

.nav-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.nav-menu::-webkit-scrollbar-thumb {
  background: var(--primary-rgba-30);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--primary-rgba-40);
}

.nav-menu::-webkit-scrollbar-thumb:hover {
  background: var(--primary-rgba-50);
  box-shadow: 0 0 12px var(--primary-rgba-60);
}

/* ============================================================================
   ACTIONS PAGE - PREMIUM DESIGN
   ============================================================================ */

/* Actions Container - Premium Page Layout */
.actions-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.actions-container > h2 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 15px var(--primary-rgba-30));
  margin-bottom: 32px;
  
  position: relative;
  padding-bottom: 16px;
}

.actions-container > h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 10%;
  transform: translateX(50%);
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  border-radius: 2px;
  box-shadow: 0 0 15px var(--primary-rgba-60);
}

.actions-container h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.actions-container h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--primary-color), var(--primary-color-dark));
  border-radius: 2px;
  box-shadow: 0 0 10px var(--primary-rgba-50);
}

.actions-container .card {
  margin-bottom: 32px;

  transition: all 0.3s ease;
}



/* Screen Item Styling */
.screen-item {
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.8), rgba(15, 15, 15, 0.6));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--primary-rgba-15);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.screen-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, var(--primary-rgba-05), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.screen-item:hover::before {
  opacity: 1;
}

.screen-item:hover {
  border-color: var(--primary-rgba-30);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-rgba-10);
  transform: translateY(-1px);
}

.screen-item .screen-label {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary-color);
  text-shadow: 0 0 8px var(--primary-rgba-30);
  letter-spacing: 0.5px;
}

.screen-link-input-inline {
  background: rgba(10, 10, 10, 0.6) !important;
  border: 1px solid var(--primary-rgba-15) !important;
  color: var(--text-secondary) !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  transition: all 0.3s ease !important;
  backdrop-filter: blur(10px);
}

.screen-link-input-inline:focus {
  border-color: var(--primary-rgba-40) !important;
  background: rgba(10, 10, 10, 0.8) !important;
  box-shadow: 0 0 0 2px var(--primary-rgba-10) !important;
  outline: none !important;
}

.queue-limit-input {
  background: rgba(10, 10, 10, 0.6) !important;
  border: 1px solid var(--primary-rgba-15) !important;
  color: var(--text-primary) !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  text-align: center !important;
  width: 70px !important;
  transition: all 0.3s ease !important;
}

.queue-limit-input:focus {
  border-color: var(--primary-rgba-40) !important;
  background: rgba(10, 10, 10, 0.8) !important;
  box-shadow: 0 0 0 2px var(--primary-rgba-10) !important;
  outline: none !important;
}

/* Action Type Badges - Enhanced Compact */
.action-row span[style*="background: #6366f1"],
.action-row span[style*="background: #8b5cf6"],
.action-row span[style*="background: #f59e0b"] {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px !important;
  border-radius: 10px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.action-row span[style*="background: #6366f1"]:hover,
.action-row span[style*="background: #8b5cf6"]:hover,
.action-row span[style*="background: #f59e0b"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Country Badges - Enhanced */
.action-row span[style*="background: rgba(99, 102, 241, 0.15)"] {
  padding: 5px 12px !important;
  border-radius: 16px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  border: 1px solid rgba(99, 102, 241, 0.3) !important;
  transition: all 0.3s ease;
}

.action-row span[style*="background: rgba(99, 102, 241, 0.15)"]:hover {
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
  transform: translateY(-1px);
}

/* Gift Images in Action Items */
.action-row img {
  transition: all 0.3s ease;
  border: 1px solid var(--primary-rgba-20);
}

.action-row img:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 20px var(--primary-rgba-30) !important;
  border-color: var(--primary-rgba-40);
}

/* Empty State Styling */
#actionsList p {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 2px dashed var(--primary-rgba-15);
}

/* Loading State */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--primary-rgba-20);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================================
   SUBSCRIPTION PANEL
   ============================================================================ */

.subscription-panel {
  max-width: 100%;
  margin-top: 24px;
}

.subscription-header {
  text-align: center;
  margin-bottom: 40px;
}

.subscription-header h2 {
  font-size: 32px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  filter: drop-shadow(0 0 15px var(--primary-rgba-30));
}

.subscription-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 400;
}

.subscription-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}

.plan-card {
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--primary-rgba-15);
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px var(--primary-rgba-08);
  animation: fadeInUp 0.6s ease-out backwards;
}

.plan-card:nth-child(1) { animation-delay: 0.1s; }
.plan-card:nth-child(2) { animation-delay: 0.2s; }

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-color-dark));
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.plan-card:hover {
  border-color: var(--primary-rgba-40);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), 0 0 40px var(--primary-rgba-20);
  transform: translateY(-4px);
}

.plan-card:hover::before {
  opacity: 1;
}

.plan-card.plan-featured {
  border-color: var(--primary-rgba-40);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), 0 0 40px var(--primary-rgba-25);
  background: rgba(15, 15, 15, 0.75);
}

.plan-card.plan-featured::before {
  height: 6px;
  opacity: 1;
  box-shadow: 0 0 20px var(--primary-rgba-60);
}

.plan-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-rgba-15);
  border: 1px solid var(--primary-rgba-30);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-badge.featured {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 20px var(--primary-rgba-40);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px var(--primary-rgba-40);
  }
  50% {
    box-shadow: 0 0 30px var(--primary-rgba-60);
  }
}

.plan-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--primary-rgba-15);
}

.plan-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.price-currency {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

.price-amount {
  font-size: 48px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.price-period {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

.plan-savings {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 12px;
  color: #4caf50;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.plan-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.feature-item i {
  color: var(--primary-color);
  font-size: 18px;
  flex-shrink: 0;
}

.feature-item:hover {
  color: var(--text-primary);
  transform: translateX(-4px);
}

.btn-subscribe {
  width: 100%;
  padding: 16px 28px;
  background: linear-gradient(135deg, var(--primary-rgba-20), var(--primary-rgba-15));
  color: var(--primary-color);
  border: 1px solid var(--primary-rgba-40);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 20px var(--primary-rgba-15);
  position: relative;
  overflow: hidden;
}

.btn-subscribe::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.btn-subscribe:hover::before {
  left: 100%;
}

.btn-subscribe:hover {
  background: linear-gradient(135deg, var(--primary-rgba-30), var(--primary-rgba-25));
  border-color: var(--primary-rgba-60);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--primary-rgba-35);
}

.btn-subscribe.featured {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 20px var(--primary-rgba-40);
}

.btn-subscribe.featured:hover {
  background: linear-gradient(135deg, var(--primary-color-light), var(--primary-color));
  box-shadow: 0 6px 32px var(--primary-rgba-60);
}

.btn-subscribe i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.btn-subscribe:hover i {
  transform: translateX(-4px);
}

.subscription-footer {
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid var(--primary-rgba-15);
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.subscription-footer p {
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* About Service Section */
.about-service {
  margin-top: 48px;
  padding: 32px;
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--primary-rgba-15);
  border-radius: 16px;
  box-shadow: 0 8px 32px var(--primary-rgba-10);
}

.about-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.about-header i {
  font-size: 24px;
  color: var(--primary-color);
  filter: drop-shadow(0 0 10px var(--primary-rgba-40));
}

.about-header h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.about-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--primary-rgba-10);
  border-radius: 12px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.5s ease-out backwards;
}

.about-item:nth-child(1) { animation-delay: 0.4s; }
.about-item:nth-child(2) { animation-delay: 0.5s; }
.about-item:nth-child(3) { animation-delay: 0.6s; }
.about-item:nth-child(4) { animation-delay: 0.7s; }
.about-item:nth-child(5) { animation-delay: 0.8s; }
.about-item:nth-child(6) { animation-delay: 0.9s; }
.about-item:nth-child(7) { animation-delay: 1.0s; }
.about-item:nth-child(8) { animation-delay: 1.1s; }

.about-item:hover {
  background: var(--primary-rgba-08);
  border-color: var(--primary-rgba-30);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--primary-rgba-20);
}

.about-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--primary-rgba-10);
  border: 1px solid var(--primary-rgba-20);
  border-radius: 12px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-icon i {
  font-size: 22px;
  color: var(--primary-color);
  filter: drop-shadow(0 0 8px var(--primary-rgba-40));
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-item:hover .about-icon {
  background: var(--primary-rgba-15);
  border-color: var(--primary-rgba-40);
  transform: scale(1.1) rotate(5deg);
}

.about-item:hover .about-icon i {
  filter: drop-shadow(0 0 15px var(--primary-rgba-60));
  transform: scale(1.1);
}

.about-text {
  flex: 1;
}

.about-text h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.about-text p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .about-service {
    padding: 24px 16px;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .about-item {
    padding: 16px;
  }
}

.subscription-status {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--primary-rgba-10);
  border: 1px solid var(--primary-rgba-30);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-color);
  font-weight: 600;
}

.subscription-status.active {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
  color: #4caf50;
}

.subscription-status i {
  font-size: 20px;
}

/* ============================================================================
   ACCOUNT CARDS CONTAINER
   ============================================================================ */

.account-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 100%;
  margin-bottom: 32px;
}

.account-card {
  margin: 0 !important;
  max-width: none !important;
}

/* When only one card is visible, limit its width */
.account-cards-container:has(.account-card:only-child) {
  grid-template-columns: 1fr;
  max-width: 600px;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* Responsive Design */
@media (max-width: 1200px) {
  .sidebar {
    width: 75px;
  }
  
  .sidebar:hover {
    width: 200px;
  }
  
  .content {
    margin-right: 75px;
  }
  
  .overlays-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .overlays-grid {
    grid-template-columns: 1fr;
  }
  
  .overlay-card.medium-width,
  .overlay-card.full-width {
    max-width: 100%;
  }
}

/* Login Required Message Animation */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

.login-required-message {
  animation: shake 0.5s ease-in-out;
}
.login-required-message button:hover {
  background: #cc0000 !important;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
}

.login-required-message button:active {
  transform: scale(0.98);
}




    /* ===== Floating Telegram Button ===== */
    .tg-float-btn {
    position: fixed;
    bottom: 32px;
    left: 32px;
    z-index: 9999;
    cursor: pointer;
    background: rgb(39 15 15 / 65%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgb(238 42 42 / 22%);
    border-radius: 50px;
    width: 50px;
    height: 50px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgb(238 42 42 / 18%), 0 2px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transition: width 0.48s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    animation: tg-float 3.2s ease-in-out infinite;
    text-decoration: none;
    display: block;
    }

    .tg-float-btn:hover {
      width: 146px;
      height: 50px;
    background: rgb(46 18 18 / 85%);
    border-color: rgb(238 42 42 / 55%);
    box-shadow: 0 14px 44px rgb(238 42 42 / 32%), 0 4px 18px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      animation-play-state: paused;
    }

    .tg-float-btn:active {
      transform: scale(0.93) !important;
      transition: transform 0.1s ease !important;
    }

    .tg-float-inner {
      display: flex;
      align-items: center;
      gap: 11px;
      padding: 0 11px 0 14px;
      height: 100%;
      white-space: nowrap;
    }

    .tg-icon-wrap {
      flex-shrink: 0;
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      color: #ff0000; /* Telegram icon color set to red, no background */
      transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .tg-float-btn:hover .tg-icon-wrap {
      transform: rotate(-8deg) scale(1.08);
    }

    .tg-svg {
      width: 37px;
      height: 37px;
    }

    .tg-label {
    font-size: 12px;
    font-weight: 850;
    color: #ff0000;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease 0.12s, transform 0.38s cubic-bezier(0.34, 1.3, 0.64, 1) 0.1s;
    font-family: 'Segoe UI', Tahoma, system-ui, sans-serif;

    }

    .tg-float-btn:hover .tg-label {
      opacity: 1;
      transform: translateX(0);
    }

    /* Glow pulse ring */
    .tg-float-btn::before {
      content: '';
      position: absolute;
      inset: -3px;
      border-radius: inherit;
      border: 1.5px solid rgba(42, 171, 238, 0.45);
      opacity: 0;
      animation: tg-pulse-ring 2.8s ease-out infinite;
      pointer-events: none;
    }

    /* Shimmer overlay */
    .tg-float-btn::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.06) 0%,
        transparent 50%,
        rgba(42, 171, 238, 0.06) 100%
      );
      pointer-events: none;
    }

    @keyframes tg-float {
      0%,  100% { transform: translateY(0px);   }
      50%        { transform: translateY(-7px);  }
    }

    @keyframes tg-pulse-ring {
      0%   { opacity: 0.65; transform: scale(1);    }
      100% { opacity: 0;    transform: scale(1.42); }
    }
