:root {
  --primary-color: #ff6b00; /* Orange color for Panter Bahis */
  --primary-light: #ff8c3f;
  --primary-dark: #e05a00;
  --primary-glow: rgba(255, 107, 0, 0.4);
  --secondary-color: #222;
  --text-color: #f5f5f5;
  --light-text: #fff;
  --dark-text: #222;
  --border-color: #444;
  --success-color: #4caf50;
  --error-color: #f44336;
  --warning-color: #ff9800;
  --background-color: #000000; /* Black background for Panter Bahis */
  --card-bg: #121212;
  --card-bg-hover: #1a1a1a;
  --input-bg: #1e1e1e;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.6);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px var(--primary-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--primary-glow);
  }
  100% {
    box-shadow: 0 0 5px var(--primary-glow);
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", "Roboto", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  background-image: radial-gradient(circle at 50% 50%, #111 0%, #000 100%);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  width: 100%;
  padding: 16px;
  padding-bottom: 80px; /* Space for bottom navigation */
  animation: fadeIn 0.5s ease-out;
}

/* Loader styles */
#loader {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
  background-color: var(--background-color);
  background-image: radial-gradient(circle at 50% 50%, #111 0%, #000 100%);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: pulse 2s infinite ease-in-out;
}

.logo img {
  max-width: 200px;
  height: auto;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
  box-shadow: 0 0 15px var(--primary-glow);
}

#loader p {
  animation: fadeIn 1s ease-out;
  font-size: 18px;
  letter-spacing: 0.5px;
}

/* Card styles */
.card {
  background-color: var(--card-bg);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.5s ease-out;
  transform-origin: center;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  background-color: var(--card-bg-hover);
  transform: translateY(-2px);
}

.card-header {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.card-title {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  animation: pulse 2s infinite ease-in-out;
}

/* Form styles */
.form-group {
  margin-bottom: 16px;
  animation: slideInLeft 0.3s ease-out;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--light-text);
  transition: var(--transition);
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  background-color: var(--input-bg);
  color: var(--light-text);
  transition: var(--transition);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8.825L1.175 4 2.05 3.125 6 7.075 9.95 3.125 10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Button styles */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  line-height: 1.5;
  border-radius: 8px;
  transition: var(--transition-bounce);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

.btn-primary {
  color: var(--light-text);
  background: linear-gradient(145deg, var(--primary-light), var(--primary-color));
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(255, 107, 0, 0.2);
}

.btn-danger {
  color: var(--light-text);
  background: linear-gradient(145deg, #f55a4e, var(--error-color));
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(145deg, var(--error-color), #d32f2f);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.btn-danger:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(244, 67, 54, 0.2);
}

.btn-warning {
  color: var(--dark-text);
  background: linear-gradient(145deg, #ffac33, var(--warning-color));
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(145deg, var(--warning-color), #f57c00);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.btn-success {
  color: var(--light-text);
  background: linear-gradient(145deg, #5cb860, var(--success-color));
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-success:hover {
  background: linear-gradient(145deg, var(--success-color), #388e3c);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-sm {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn i {
  margin-right: 6px;
}

/* Table styles */
.table-container {
  overflow-x: auto;
  margin-bottom: 16px;
  border-radius: 8px;
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  animation: fadeIn 0.5s ease-out;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.table th {
  background-color: rgba(255, 107, 0, 0.1);
  font-weight: 600;
  color: var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.table tr {
  transition: var(--transition);
}

.table tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

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

/* Alert styles */
.alert {
  padding: 12px 15px;
  margin-bottom: 16px;
  border-radius: 8px;
  border-left: 4px solid;
  animation: slideInUp 0.3s ease-out;
  transition: var(--transition);
}

.alert-success {
  background-color: rgba(76, 175, 80, 0.1);
  border-left-color: var(--success-color);
  color: #81c784;
  box-shadow: 0 2px 10px rgba(76, 175, 80, 0.2);
}

.alert-error {
  background-color: rgba(244, 67, 54, 0.1);
  border-left-color: var(--error-color);
  color: #e57373;
  box-shadow: 0 2px 10px rgba(244, 67, 54, 0.2);
}

.alert-info {
  background-color: rgba(33, 150, 243, 0.1);
  border-left-color: #2196f3;
  color: #64b5f6;
  box-shadow: 0 2px 10px rgba(33, 150, 243, 0.2);
}

/* Login container */
.login-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 24px;
  background-color: var(--card-bg);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.5s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-container h2 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--primary-color);
  animation: pulse 2s infinite ease-in-out;
}

/* Panel container */
.panel-container {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 80px; /* Space for bottom navigation */
  animation: fadeIn 0.5s ease-out;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  animation: slideInLeft 0.3s ease-out;
}

.panel-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Status indicators */
.status-active {
  color: var(--success-color);
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-active i {
  animation: pulse 2s infinite ease-in-out;
}

.status-inactive {
  color: var(--error-color);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(18, 18, 18, 0.95);
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  animation: slideInUp 0.3s ease-out;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-color);
  text-decoration: none;
  font-size: 12px;
  opacity: 0.7;
  transition: var(--transition-bounce);
  padding: 8px 0;
  width: 33.333%;
  position: relative;
}

.bottom-nav-item.active {
  color: var(--primary-color);
  opacity: 1;
  transform: translateY(-5px);
}

.bottom-nav-item.active:before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background-color: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-glow);
}

.bottom-nav-icon {
  font-size: 24px;
  margin-bottom: 4px;
  transition: var(--transition);
}

.bottom-nav-item:hover .bottom-nav-icon {
  transform: scale(1.2);
}

/* Tabs */
.tabs {
  display: none; /* Hide tabs on mobile, use bottom nav instead */
  animation: slideInLeft 0.3s ease-out;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

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

/* Responsive adjustments */
@media (min-width: 768px) {
  .container {
    max-width: 768px;
    margin: 0 auto;
    padding: 24px;
  }

  .login-container {
    max-width: 400px;
    margin: 100px auto;
    transform: translateY(0);
    transition: var(--transition);
  }

  .login-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
  }

  .bottom-nav {
    display: none; /* Hide bottom nav on desktop */
  }

  .tabs {
    display: flex; /* Show tabs on desktop */
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow: hidden;
  }

  .tab {
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    margin-right: 5px;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
  }

  .tab:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
  }

  .tab.active {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--primary-color);
    margin-bottom: -1px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  }

  .tab.active:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    animation: slideInLeft 0.3s ease-out;
  }

  .container {
    padding-bottom: 24px; /* No need for extra space on desktop */
  }

  .panel-container {
    margin-bottom: 24px; /* No need for extra space on desktop */
  }
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-3 {
  margin-top: 16px;
}

.mb-3 {
  margin-bottom: 16px;
}

.d-flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.gap-2 {
  gap: 8px;
}

.w-100 {
  width: 100%;
}

/* Custom Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: var(--transition);
  border-radius: 30px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: var(--transition);
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-glow);
}

input:checked + .toggle-slider:before {
  transform: translateX(30px);
}

/* Animated elements */
.animated-icon {
  animation: pulse 2s infinite ease-in-out;
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.3s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

.slide-in-up {
  animation: slideInUp 0.3s ease-out;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--card-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Fix for mobile devices */
@media (max-width: 767px) {
  .table-container {
    margin-bottom: 80px; /* Extra space for bottom nav on mobile */
  }

  .table td {
    white-space: normal;
    word-break: break-word;
  }

  .actions {
    flex-direction: row;
    justify-content: flex-start;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* Fix for table on small screens */
@media (max-width: 480px) {
  .table th,
  .table td {
    padding: 8px 6px;
    font-size: 14px;
  }

  .actions {
    flex-direction: column;
    gap: 4px;
  }

  .btn-sm {
    width: 100%;
    margin-bottom: 4px;
  }
}

