/* ====================================================================
   Tansik Web Application — High-Contrast Components & Elements
   ==================================================================== */

/* Glass Cards */
.glass-card {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.15), 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Premium Buttons */
.btn-primary {
  background: linear-gradient(135deg, #2563EB, #00E5FF);
  color: #FFFFFF;
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 1.08rem;
  border: none;
  border-radius: 14px;
  padding: 15px 32px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  width: 100%;
  box-shadow: 0 8px 20px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 229, 255, 0.45);
  background: linear-gradient(135deg, #1D4ED8, #00B8D4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-secondary:hover {
  border-color: #00E5FF;
  color: #00E5FF;
  background: rgba(0, 229, 255, 0.1);
}

/* High Contrast Form Elements */
.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  color: #E2E8F0;
  font-size: 0.94rem;
  text-align: right;
}

.form-control {
  background: #0B172A;
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #FFFFFF;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 1rem;
  font-family: 'Cairo', sans-serif;
  width: 100%;
  transition: all 0.25s ease;
  min-height: 50px;
}

.form-control::placeholder {
  color: #94A3B8;
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: #00E5FF;
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.2);
  background: #0F223D;
}

select.form-control {
  cursor: pointer;
  appearance: auto;
}

select.form-control option {
  background: #0F172A;
  color: #FFFFFF;
  padding: 12px;
}

/* Badges */
.badge-guaranteed {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.badge-likely {
  background: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-flex;
}

.badge-hard {
  background: rgba(244, 63, 94, 0.2);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-flex;
}

/* Table Custom & Responsive Touch Container */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 10px;
  border-radius: 12px;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 650px;
}

.table-custom th, .table-custom td {
  padding: 14px 16px;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.table-custom thead th {
  background: rgba(0, 150, 255, 0.12);
  color: #00E5FF;
  font-weight: 800;
  font-size: 0.88rem;
  position: sticky;
  top: 0;
}

.table-custom tbody tr:hover {
  background: rgba(0, 229, 255, 0.06);
}

/* Live Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0; left: 0;
  background: #0B172A;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.7);
  z-index: 500;
  max-height: 380px;
  overflow-y: auto;
}

.search-item {
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.search-item:hover {
  background: rgba(0, 229, 255, 0.12);
}

.search-item-name {
  font-weight: 800;
  color: #F8FAFC;
  font-size: 0.98rem;
}

.search-item-meta {
  font-size: 0.84rem;
  color: #94A3B8;
  margin-top: 3px;
}

/* Loader */
.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  gap: 12px;
  color: #00E5FF;
  font-weight: 800;
}

.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(0, 229, 255, 0.2);
  border-top-color: #00E5FF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* AdSense Containers */
.adsense-container {
  margin: 20px auto;
  text-align: center;
}

.adsense-slot {
  background: rgba(11, 23, 42, 0.5);
  border: 1px dashed rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 8px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.adsense-label {
  font-size: 0.7rem;
  color: #64748B;
  margin-bottom: 4px;
}

.adsense-sticky-mobile {
  position: fixed;
  bottom: 0; right: 0; left: 0;
  z-index: 900;
  background: rgba(11, 20, 38, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  padding: 8px 16px;
  text-align: center;
  display: none;
}

.adsense-sticky-mobile .close-ad {
  position: absolute;
  top: -10px;
  left: 14px;
  background: #F43F5E;
  color: #FFF;
  border: none;
  border-radius: 50%;
  width: 22px; height: 22px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Breakpoints & Responsive Tweaks */
@media (max-width: 768px) {
  .adsense-sticky-mobile { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .glass-card { padding: 18px !important; }
  .form-control { font-size: 0.92rem; padding: 12px 14px; }
  .table-custom { font-size: 0.82rem; }
  .table-custom th, .table-custom td { padding: 10px 12px; }
}
