/* ===================================
   WIN MACHANCE CASINO - COMPONENTS CSS
   Кнопки, Карточки, Формы, Компоненты
   =================================== */

/* ===================================
   BUTTONS
   =================================== */

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.6);
}

.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--primary);
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===================================
   CARDS
   =================================== */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  border: 1px solid var(--border-light);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--gold);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-light);
}

/* Game Card */
.game-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 1;
}

.game-card:hover::before {
  opacity: 1;
}

.game-card-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.game-card:hover .game-card-img {
  transform: scale(1.1);
}

.game-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 2;
}

.game-card:hover .game-card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.game-card-title {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  text-align: center;
  color: var(--text-primary);
}

.game-card-provider {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ===================================
   BADGES
   =================================== */

.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
  line-height: 1;
}

.badge-gold {
  background: var(--gold);
  color: var(--primary);
}

.badge-success {
  background: var(--success);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: white;
}

.badge-danger {
  background: var(--danger);
  color: white;
}

.badge-outline {
  background: transparent;
  border: 1px solid currentColor;
}

/* ===================================
   FORMS
   =================================== */

.form-group {
  margin-bottom: 1.5rem;
}

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

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
  background: var(--bg-card);
}

.form-control::placeholder {
  color: var(--text-muted);
}

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

.form-select {
  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='%23ffd700' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  cursor: pointer;
}

.form-check-label {
  cursor: pointer;
  user-select: none;
}

/* ===================================
   TABS
   =================================== */

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-light);
  overflow-x: auto;
}

.tab {
  padding: 1rem 1.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.tab:hover {
  color: var(--gold);
}

.tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ===================================
   ACCORDION / FAQ
   =================================== */

.accordion {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--border-light);
}

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

.accordion-header {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-base);
}

.accordion-header:hover {
  background: rgba(255, 215, 0, 0.05);
  color: var(--gold);
}

.accordion-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: transform var(--transition-base);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
}

.accordion-body {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===================================
   RATING STARS
   =================================== */

.rating {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}

.rating-star {
  font-size: 1.125rem;
  color: var(--gold);
}

.rating-star.empty {
  color: var(--text-muted);
}

.rating-value {
  margin-left: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===================================
   TABLES
   =================================== */

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table thead {
  background: rgba(255, 215, 0, 0.1);
}

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

.table td {
  padding: 1rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.table tbody tr:hover {
  background: rgba(255, 215, 0, 0.05);
}

/* ===================================
   PROGRESS BAR
   =================================== */

.progress {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* ===================================
   MODALS
   =================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform var(--transition-base);
  border: 1px solid var(--border-color);
}

.modal-backdrop.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.5rem;
  margin: 0;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* ===================================
   ALERTS
   =================================== */

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-success {
  background: rgba(46, 204, 113, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.alert-warning {
  background: rgba(243, 156, 18, 0.1);
  border-color: var(--warning);
  color: var(--warning);
}

.alert-danger {
  background: rgba(231, 76, 60, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

.alert-info {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--gold);
  color: var(--gold);
}

/* ===================================
   TOOLTIPS
   =================================== */

.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip-text {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: var(--z-tooltip);
  box-shadow: var(--shadow-lg);
}

.tooltip:hover .tooltip-text {
  opacity: 1;
  visibility: visible;
}

/* ===================================
   PAGINATION
   =================================== */

.pagination {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.pagination-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.pagination-item:hover {
  background: var(--gold);
  color: var(--primary);
  border-color: var(--gold);
}

.pagination-item.active {
  background: var(--gold);
  color: var(--primary);
  border-color: var(--gold);
}

.pagination-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===================================
   BREADCRUMB
   =================================== */

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 1rem 0;
  font-size: 0.875rem;
}

.breadcrumb-item {
  color: var(--text-muted);
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-item.active {
  color: var(--gold);
}
