/* ============================================
   CRAZY TIME - COMPONENTS CSS
   Buttons, cards, forms, navigation, etc.
   ============================================ */

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left var(--transition-normal);
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: var(--text);
  box-shadow: 0 4px 15px rgba(108, 59, 214, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 59, 214, 0.6);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #ff9500);
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--text);
}

.block-dark .btn-outline {
  border-color: var(--gold);
  color: var(--gold);
}

.block-dark .btn-outline:hover {
  background: var(--gold);
  color: var(--primary);
}

.block-gradient .btn-outline {
  border-color: var(--gold);
  color: var(--gold);
}

.block-gradient .btn-outline:hover {
  background: var(--gold);
  color: var(--primary);
}

.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

.btn-small {
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========== HEADER ========== */
.header {
  background: var(--primary);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--shadow);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-secondary);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.logo-icon {
  font-size: 2rem;
}

.nav {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-link {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.nav-link:hover {
  color: var(--gold);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ========== PAGE NAVIGATION (TOC) ========== */
.page-nav {
  background: #ffffff;
  padding: var(--spacing-md) 0;
  border-bottom: 2px solid var(--background-light);
  position: sticky;
  top: 70px;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-nav-list {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.page-nav-list::-webkit-scrollbar {
  height: 4px;
}

.page-nav-item {
  white-space: nowrap;
}

.page-nav-link {
  padding: 0.5rem 1.25rem;
  color: var(--text-dark);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: block;
}

.page-nav-link:hover {
  background: var(--background-light);
  color: var(--accent);
}

.page-nav-link.active {
  background: var(--accent);
  color: var(--text);
}

/* ========== HERO SECTION ========== */
.hero {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.9) 100%), 
              url('../images/hero/hero-crazy-time-main.jpg') center/cover no-repeat;
  color: var(--text);
  padding: var(--spacing-3xl) 0;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--text);
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xl);
  line-height: 1.8;
  opacity: 0.95;
}

.hero-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

.stars {
  color: var(--gold);
  font-size: 1.5rem;
}

.rating-text {
  font-size: 1.125rem;
  font-weight: 600;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== CARDS ========== */
.card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: 0 4px 6px var(--shadow);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--shadow);
}

.card-header {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--background-light);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
  color: var(--primary);
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.card-body {
  margin-bottom: var(--spacing-md);
}

.card-footer {
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--background-light);
}

.card-gradient {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: var(--text);
}

.card-gradient .card-title {
  color: var(--text);
}

/* Casino Card */
.casino-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.casino-card-image {
  height: 150px;
  background: var(--background-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.casino-icon {
  font-size: 4rem;
  color: var(--accent);
}

.casino-badge {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: var(--gold);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.casino-features {
  list-style: none;
  padding: 0;
  margin-bottom: var(--spacing-md);
}

.casino-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.casino-features li:last-child {
  border-bottom: none;
}

.casino-features .icon {
  color: var(--success);
}

/* ========== PROS/CONS BOXES ========== */
.pros-cons-box {
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
}

.pros-box {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(46, 204, 113, 0.05));
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.cons-box {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.05));
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.pros-title, .cons-title {
  color: var(--text);
  margin-bottom: var(--spacing-md);
  font-size: 1.25rem;
}

.pros-list, .cons-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pros-list li, .cons-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pros-list li:last-child, .cons-list li:last-child {
  border-bottom: none;
}

.pros-list i, .cons-list i {
  color: var(--success);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.cons-list i {
  color: var(--danger);
}

.pros-list strong, .cons-list strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.25rem;
}

.pros-list p, .cons-list p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* ========== ACCORDION (FAQ) ========== */
.accordion {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
}

.accordion-item {
  border-bottom: 1px solid var(--background-light);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  padding: var(--spacing-md) var(--spacing-lg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  transition: background var(--transition-fast);
  user-select: none;
}

.accordion-header:hover {
  background: var(--background-light);
}

.accordion-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.accordion-icon {
  font-size: 1.25rem;
  color: var(--accent);
  transition: transform var(--transition-normal);
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.accordion-body {
  padding: 0 var(--spacing-lg) var(--spacing-lg) var(--spacing-lg);
  color: var(--text-dark);
  line-height: 1.8;
}

/* ========== TABS ========== */
.tabs {
  margin-bottom: var(--spacing-lg);
}

.tabs-header {
  display: flex;
  gap: var(--spacing-sm);
  border-bottom: 2px solid var(--background-light);
  margin-bottom: var(--spacing-lg);
  overflow-x: auto;
}

.tab-button {
  padding: var(--spacing-md) var(--spacing-lg);
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.tab-button::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

.tab-button:hover {
  color: var(--accent);
}

.tab-button.active {
  color: var(--accent);
}

.tab-button.active::after {
  transform: scaleX(1);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== STATISTICS TICKER ========== */
.stats-ticker {
  background: var(--primary);
  color: var(--text);
  padding: var(--spacing-lg) 0;
  overflow: hidden;
}

.ticker-wrapper {
  display: flex;
  animation: scroll 30s linear infinite;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: 0 var(--spacing-xl);
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.ticker-icon {
  font-size: 2rem;
  color: var(--gold);
}

.ticker-info h4 {
  color: var(--text);
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.ticker-info p {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.8;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========== FORMS ========== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
  background: #ffffff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 59, 214, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
}

/* ========== BADGES ========== */
.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: var(--success);
  color: #ffffff;
}

.badge-gold {
  background: var(--gold);
  color: var(--primary);
}

.badge-primary {
  background: var(--accent);
  color: var(--text);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--primary);
  color: var(--text);
  padding: var(--spacing-3xl) 0 var(--spacing-lg) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
  color: var(--gold);
  margin-bottom: var(--spacing-md);
  font-size: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: var(--spacing-xs);
}

.footer-links a {
  color: var(--text);
  opacity: 0.8;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--gold);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-lg);
  text-align: center;
  opacity: 0.8;
}

.disclaimer {
  background: var(--warning);
  color: var(--primary);
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-md);
  font-size: 0.875rem;
  text-align: center;
  font-weight: 600;
}

/* ========== VIDEO EMBED ========== */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 20px var(--shadow);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ========== FILTER PANEL ========== */
.filter-panel {
  background: #ffffff;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: var(--spacing-xl);
}

.filter-group {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  align-items: center;
}

.filter-label {
  font-weight: 600;
  color: var(--text-dark);
}

.filter-select {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  cursor: pointer;
}

/* ========== GRID ========== */
.grid {
  display: grid;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
