/* ========================================
   NAMAKO.FUN / FILMKIO EXACT DESIGN SYSTEM
   Tamasha Exclusive Theme
   ======================================== */

:root {
  /* Primary Colors - Gold Accent */
  --color-primary: #f5ad11;
  --color-primary-hover: #d99a0f;
  --color-primary-light: #ffc940;
  --color-primary-rgb: 245, 173, 17;
  
  /* Background Colors - Dark Theme */
  --bg-body: #0b0e0f;
  --bg-surface: #111618;
  --bg-elevated: #1a1f22;
  --bg-hover: #1f292e;
  --bg-input: #151a1d;
  --bg-overlay: rgba(11, 14, 15, 0.9);
  
  /* Text Colors */
  --text-primary: #f2f2f2;
  --text-secondary: #b8b8b8;
  --text-muted: #787878;
  --text-inverse: #0b0e0f;
  
  /* Border Colors */
  --border-default: #2a2f33;
  --border-light: #3a3f43;
  --border-focus: #f5ad11;
  
  /* Status Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  
  /* Typography - Font Sizes */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;
  --fs-5xl: 3rem;
  
  /* Font Weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  
  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
  --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.6);
  --shadow-button-hover: 0 8px 20px rgba(245, 173, 17, 0.4);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 500;
  --z-header: 1000;
  --z-modal-backdrop: 1500;
  --z-modal: 2000;
  --z-toast: 3000;
  
  /* Header Dimensions */
  --header-height: 58px;
  --header-height-mobile: 52px;
  
  /* Container */
  --container-max-width: 1240px;
  
  /* Legacy compatibility */
  --tx-bg: #0b0e0f;
  --tx-surface: #111618;
  --tx-text: #f2f2f2;
  --tx-primary: #f5ad11;
  --tx-border: #2a2f33;
}

/* ========================================
   BASE STYLES
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'YekanBakh', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  font-size: var(--fs-base);
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.filmkio_page {
  min-height: 100vh;
  padding-top: var(--header-height);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ========================================
   CONTAINER
   ======================================== */

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  width: 100%;
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-4);
  }
}

/* ========================================
   FILMKIO HEADER
   ======================================== */

.filmkio_header {
  height: var(--header-height);
  background: rgba(10, 13, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, top 0.4s ease;
  width: 100%;
}

.filmkio_header.in_top {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}


.filmkio_header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.right_side_header {
  display: flex;
  align-items: center;
  gap: 0;
}

.left_side_header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  position: relative;
}


.logo_holder {
  display: flex;
  align-items: center;
  height: 100%;
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  transition: color var(--transition-base);
}

.logo_holder:hover {
  color: var(--color-primary);
}

.svg_logo {
  width: 140px;
  height: auto;
  fill: var(--text-primary);
  transition: fill var(--transition-base);
}

.logo_holder:hover .svg_logo {
  fill: var(--color-primary);
}

.menu_header {
  display: block;
}

.menu_header ul {
  display: flex;
  align-items: center;
  gap: 0;
}

.menu_header ul > li {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  cursor: pointer;
  transition: color var(--transition-base);
}

.menu_header ul > li:hover {
  color: var(--color-primary);
}

.has_child_category {
  position: relative;
}

.icon_arrow {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-base);
}

.has_child_category:hover .icon_arrow {
  transform: rotate(180deg);
}

/* Search Button */
.btn_search_header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn_search_header:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(245, 173, 17, 0.1);
}

.icon_search {
  width: 20px;
  height: 20px;
}

/* Pricing Link */
.link_pricing {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: var(--text-inverse);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.link_pricing:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
  color: var(--text-inverse);
}

/* Mobile Header */
@media (max-width: 1024px) {
  .filmkio_header {
    height: var(--header-height-mobile);
  }
  
  .menu_header {
    display: none;
  }
  
  .svg_logo {
    width: 120px;
  }
  
  .logo_holder {
    font-size: var(--fs-lg);
  }
}

/* ========================================
   FILMKIO CARDS (item_owl)
   ======================================== */

.item_owl {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  transition: all var(--transition-smooth);
}

.item_owl:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
}

.poster_holder {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg-elevated);
}

.poster_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.item_owl:hover .poster_img {
  transform: scale(1.05);
}

.overlay_info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4);
  background: linear-gradient(180deg, transparent 0%, var(--bg-overlay) 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-2);
}

.imdb_rate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(245, 173, 17, 0.15);
  border: 1px solid rgba(245, 173, 17, 0.3);
  border-radius: 6px;
  color: var(--color-primary);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}

.quality_badge {
  padding: 4px 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  color: var(--color-success);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}

.card_content {
  padding: var(--space-3);
}

.card_content .title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card_content .meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* Loading Placeholder */
.loading_placeholder,
.placeholder_loading {
  background: linear-gradient(90deg, var(--bg-surface) 0%, var(--bg-elevated) 50%, var(--bg-surface) 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* ========================================
   DROPDOWN COMPONENT (dropdown_filmkio)
   ======================================== */

.dropdown_filmkio {
  position: relative;
  width: 100%;
}

.label_dropdown {
  background-color: #141414;
  border-radius: .5rem;
  color: #787878;
  padding: 0 .4rem;
  pointer-events: none;
  position: absolute;
  right: .8rem;
  top: 50%;
  transform: translateY(-2rem) scale(.9);
  transition: all .3s ease;
  white-space: nowrap;
  will-change: transform;
  z-index: 2;
  font-size: 11px;
}

.main_dropdown {
  align-items: center;
  background: none;
  border: .1rem solid #787878;
  border-radius: .5rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-flow: row nowrap;
  height: 3rem;
  justify-content: space-between;
  outline: 0;
  padding: 1.2rem .8rem;
  position: relative;
  transition: all .2s ease;
  width: 100%;
}

.main_dropdown:hover {
  border-color: #f2f2f2;
}

.dropdown_filmkio.active .main_dropdown,
.dropdown_filmkio.open .main_dropdown {
  border-color: var(--color-primary);
}

.dropdown_value {
  color: #f0f0f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-sm);
}

.dropdown_icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-base);
}

.dropdown_filmkio.active .dropdown_icon {
  transform: rotate(180deg);
}

.dropdown_body {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #1a1f22;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  max-height: 300px;
  overflow-y: auto;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-smooth);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.06);
}

.dropdown_filmkio.active .dropdown_body {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter_input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: none;
  border-bottom: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  outline: none;
}

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

.item_dropdown_body,
.item_dropdown_genre_body {
  padding: 10px 16px;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.item_dropdown_body:hover,
.item_dropdown_genre_body:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.item_dropdown_body.active,
.item_dropdown_genre_body.active {
  background: rgba(245, 173, 17, 0.1);
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

/* ========================================
   FLOATING LABEL INPUT (floatlabelinput)
   ======================================== */

.floatlabelinput {
  position: relative;
  width: 100%;
}

.input_float {
  width: 100%;
  padding: 16px 16px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  outline: none;
  transition: all var(--transition-base);
}

.input_float:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(245, 173, 17, 0.1);
}

.label_placeholder {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  pointer-events: none;
  transition: all var(--transition-base);
}

.input_float:focus + .label_placeholder,
.input_float:not(:placeholder-shown) + .label_placeholder {
  top: 8px;
  font-size: 11px;
  color: var(--color-primary);
  transform: translateY(0);
}

/* ========================================
   BUTTONS - FILMKIO STYLE
   ======================================== */

.btn-primary,
.tm-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: var(--text-inverse);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-primary:hover,
.tm-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
  color: var(--text-inverse);
}

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

.btn-secondary,
.tm-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 24px;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-secondary:hover,
.tm-btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-icon:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(245, 173, 17, 0.1);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.icon_holder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.active {
  /* Active state - context dependent */
}

.visible {
  opacity: 1 !important;
  visibility: visible !important;
}

.loader_filter {
  /* Loading indicator */
}

.row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.s_row_th_adv {
  display: flex;
  gap: var(--space-4);
}

/* ========================================
   SEARCH BOX
   ======================================== */

.search_box_header {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.inner_search_box {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  height: 48px;
  padding: 0 16px;
  gap: var(--space-2);
  transition: all var(--transition-base);
}

.inner_search_box:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(245, 173, 17, 0.1);
}

.str_search_int {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: var(--fs-sm);
  outline: none;
}

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

.btn_submit_holder button {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn_submit_holder button:hover {
  color: var(--color-primary);
}

.btn_settings_holder {
  display: flex;
  align-items: center;
}

.settings_icon_holder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition-base);
}

.settings_icon_holder:hover {
  color: var(--color-primary);
}

.icon-settings {
  width: 20px;
  height: 20px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 640px) {
  .filmkio_page {
    padding-top: var(--header-height-mobile);
  }
  
  .row,
  .s_row_th_adv {
    flex-direction: column;
  }
  
  .search_box_header {
    max-width: 100%;
  }
}

/* ========================================
   FOOTER
   ======================================== */

.filmkio_footer {
  background: var(--bg-body);
  border-top: 1px solid var(--border-default);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer_top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer_column h4 {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer_column ul li {
  margin-bottom: 12px;
}

.footer_column ul li a {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: color var(--transition-base);
}

.footer_column ul li a:hover {
  color: var(--color-primary);
}

.footer_bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border-default);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .footer_top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .footer_top {
    grid-template-columns: 1fr;
  }
}
