*,
*::before,
*::after {
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
body {
  margin: 0;
  background-color: #0b2a2e;
  color: #e6f2f3;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
.page-content {
  flex: 1;
  padding: 20px;
  box-sizing: border-box;
}
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 50px;
  padding-bottom: 20px;
}
:root {
  --glow-color: #00ff22; 
  --bg-dark: #0a0a0a;
    --dynamic-color: #00d4ff; 
}
.header-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  gap: 10px;
  padding: 20px;
  font-family: 'Cinzel', serif;
  letter-spacing: 3px;
}
.header-title .subtitle {
  font-family: 'Courier New', monospace; 
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 3px;
  color: var(--glow-color);
  text-shadow: 0 0 8px rgba(0, 255, 140, 0.4);
  margin: 0;
  text-transform: uppercase;
}
.header-title h1 {
  font-family: 'Arial Black', sans-serif;
  font-size: 2.8rem; 
  color: #fff;
  margin: 0;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  flex-wrap: wrap; 
  gap: 5px;
  line-height: 1.2;
}
.chem-box {
  background-color: rgba(0, 71, 27, 0.8);
  color: #fff;
  padding: 4px 12px;
  border: 2px solid var(--glow-color);
  box-shadow: 0 0 15px rgba(0, 255, 140, 0.3);
  display: inline-flex;
  font-weight: 900;
  position: relative;
  font-family: 'Space Mono', monospace; 
}
.chem-box::before {
  content: '∞'; 
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 0.6rem;
  color: var(--glow-color);
}
.mobile-break {
  display: none;
}
.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
.pill-button,
.filter-wrapper {
  position: relative;
  height: 42px;
  padding: 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--dynamic-color);
  border-radius: 30px;
  color: var(--dynamic-color);
  font-family: 'Space Mono', monospace;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  box-sizing: border-box;
  text-shadow: none;
  box-shadow: none;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}
.filter-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}
.filter-icon {
  display: inline-block;
  font-size: 0.9rem;
  color: inherit;
  transition: transform 0.3s ease;
}
.filter-wrapper.active .filter-icon {
 transform: rotate(90deg);
}
.dropdown-box.show {
  display: block !important;
}
.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  color: white;
  padding-bottom: 10px;
}
.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 -15px 15px -15px;
}
.dropdown-item .icon {
  font-size: 1.2rem;
  width: 20px;
}
.table-scroll-area {
  flex: 1;                
  width: 100%;
  overflow-x: scroll;       
  overflow-y: hidden;     
  padding: 10px 0;
  scrollbar-width: none;  
  -ms-overflow-style: none;  
}
.table-scroll-area::-webkit-scrollbar {
  display: none;          
}
.table {
  display: grid;
  grid-template-columns: repeat(12, 110px); 
  grid-auto-rows: 140px;    
  gap: 12px;
  width: max-content; 
  margin: 0 auto;
  padding: 20px;
}
.hover-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7); 
  backdrop-filter: blur(10px);    
  -webkit-backdrop-filter: blur(10px);
  z-index: 900;                  
  pointer-events: none;          
  opacity: 0;
  transition: opacity 0.4s ease;
}
body:has(.cell:hover) .hover-overlay {
  opacity: 1;
}
.cell:hover {
  z-index: 1001 !important; 
  position: relative;
}
.table:has(.cell:hover) .cell:not(:hover) {
  filter: grayscale(0.8) brightness(0.4);
  opacity: 0.5;
  transform: scale(0.9); 
}
.table:has(.empty-cell:hover) ~ .hover-overlay,
body:has(.empty-cell:hover) .hover-overlay {
  opacity: 0 !important;
  backdrop-filter: none;
}
.cell {
  position: relative;
  width: 110px;
  height: 140px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  background-color: #0b2a2e;
  border: 2px solid currentColor;
  cursor: pointer;
  z-index: 1;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s ease,
    z-index 0s;
}
.number { font-size: 0.9rem; font-weight: 500; }
.code {
  font-size: 2.4rem;
  font-weight: 600;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.title {
  font-size: 0.65rem;
  text-align: center;
  line-height: 1.2;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.algérie { color: #00bb06; }
.nazisme { color: #f26d6d; }
.islam { color: #00ff8c; }
.europe { color: #ff7c1f; }
.art { color: #ffff00; }
.philosophie { color: #00bbff; }
.cell::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  z-index: 5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.empty-cell {
  width: 110px;
  height: 140px;
  border: 1px dashed rgba(230, 242, 243, 0.15); 
  box-sizing: border-box;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
}
.empty-cell::after {
  content: "+";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(230, 242, 243, 0.05); 
  font-size: 0.8rem;
}
.empty-cell:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.02);
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;
  cursor: pointer; 
}
.modal-content {
  background: linear-gradient(135deg, rgba(30, 70, 75, 0.98), rgba(15, 40, 45, 0.98));
  width: 650px; 
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  color: white;
  box-shadow: 0 25px 50px rgba(0,0,0,0.6);
  cursor: default; 
  gap: 30px;
} 
.modal-footer-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-stats-info {
  display: flex;
  gap: 30px; 
  color: rgba(230, 242, 243, 0.7);
}
.modal-stats-info span {
  font-size: 1.1rem; 
  letter-spacing: 0.5px;
}
.modal-stats-info strong {
  color: #00d4ff; 
  margin-right: 8px;
  font-weight: 800;
  font-size: 0.9rem; 
}
#modal-pages-main, 
#modal-year-main {
  color: white;
  font-weight: 600;
}
.btn-buy-now {
  background: #00d4ff; 
  color: #0b2a2e;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}
.btn-buy-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 212, 255, 0.5);
}
#close-modal {
  position: absolute;
  top: 20px;
  right: 25px;       
  font-size: 35px;
  line-height: 1;
  color: white;
  cursor: pointer;
  opacity: 0.5;
  z-index: 100;      
  transition: opacity 0.2s;
  background: rgba(0, 0, 0, 0.2); 
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
#close-modal:hover {
  opacity: 1;        
}
.modal-body { 
  display: flex; 
  gap: 25px; 
  align-items: flex-start; 
}
.modal-left { 
  width: 250px; 
  flex-shrink: 0;
  display: flex; 
  flex-direction: column; 
  gap: 20px; 
}
#modal-img-main { 
  width: 250px;           
  height: 390px;          
  object-fit: cover;      
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  display: block;
  margin: 0 auto;         
}
.btn-more-details {
  display: block;
  text-align: center;
  padding: 10px ;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: white;
  transition: all 0.3s ease;
  margin-top: -10px; 
  margin-bottom: 5px; 
}
.modal-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.modal-header-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 5px;
}
#modal-title-main {
  display: inline;          
  font-size: 1.5rem;
  margin: 0;
text-transform: uppercase;
padding-right: 50px;     
  line-height: 1.2;        
}
#modal-badge-main {
  display: inline-block;
  width: fit-content;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  margin-left: auto;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  flex-shrink: 0;
  text-shadow: 
    -0.5px -0.5px 0 #000, 
     0.5px -0.5px 0 #000, 
    -0.5px  0.5px 0 #000, 
     0.5px  0.5px 0 #000;
}
#modal-author-main { 
  font-size: 1.1rem;
  opacity: 0.7; 
  margin-bottom: 30px; 
}
.modal-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between; 
  width:345px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 20px;
  box-sizing: border-box;
}
.big-rating { 
  font-size: 3rem; 
  font-weight: 800; 
  color: #ffcc00; 
  line-height: 1; 
  min-width: 80px; 
}
.stars { 
  display: flex; 
  gap: 2px;
  font-size: 1.4rem; 
}
.star-container {
  position: relative;
  display: inline-block;
  color: rgba(255, 255, 255, 0.2); 
  cursor: default;
}
.star-fill {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
  color: #ffcc00; 
  width: 0%; 
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.4);
}
.modal-description::-webkit-scrollbar {
  display: none;
}
.btn-buy-book { display: none; }
.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 25px;
  gap: 20px;
}
.hover-card {
  position: fixed;
  width: 450px;
  background: linear-gradient(180deg, #1a3c40 0%, #0b2a2e 100%);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.7);
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  display: flex;
  flex-direction: column;
  color: white;
  transition: opacity 0.2s ease-out;
  overflow: visible; 
  will-change: left, top; 
  transition: opacity 0.2s ease-out;
}
.hover-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-start;
  gap: 15px; 
  margin-bottom: 12px;
  padding-top: 20px; 
}
.hover-score { font-size: 2.8rem; font-weight: 800; color: #ffcc00; line-height: 1; }
.hover-image-container img { 
  width: 200px; 
  height: 310px; 
  object-fit: cover; 
  border-radius: 8px;
  margin-top: -120px; 
  box-shadow: 0 15px 30px rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.2);
}
.hover-description-box {
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(230, 242, 243, 0.9);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical;
  overflow: hidden; 
  padding-right: 0;
}
.hover-book-title {
  font-size: 1.2rem;
  font-weight: 700;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  margin-bottom: 10px;
  color: white;
  text-shadow: -0.5px -0.5px 0 #000, 0.5px -0.5px 0 #000, -0.5px 0.5px 0 #000, 0.5px 0.5px 0 #000;
}
.hover-footer-row { display: flex; justify-content: space-between; align-items: center; }
.hover-author { font-size: 0.9rem; opacity: 0.8; margin: 0; }
.hover-badge { 
  font-size: 0.90rem; 
  padding: 8px 16px; 
  border-radius: 20px; 
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  text-shadow: 
    -0.5px -0.5px 0 #000, 
     0.5px -0.5px 0 #000, 
    -0.5px  0.5px 0 #000, 
     0.5px  0.5px 0 #000;
}
.hidden { display: none !important; }
.hover-rating-section {
  margin-left: 20px; 
  display: flex;
  flex-direction: column;
  gap: 5px; 
}
.hover-rating-label {
  font-size: 1.2rem;        
  text-transform: uppercase;
  color: rgb(255, 255, 255); 
  font-weight: 700;
  letter-spacing: 2px;        
  margin-top: -2px;           
  display: block;
  text-align: center;
}
.hover-rating-label {
  text-shadow: 0 0 5px rgb(255, 83, 83);
}
.rating-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  cursor: pointer;
  margin-bottom: 4px;
}
.rating-item:hover {
  background: rgba(255, 204, 0, 0.503); 
  border-color: rgba(255, 204, 0, 0.3);
  transform: translateX(8px); 
}
.rating-item:hover .stars-display svg {
  filter: drop-shadow(0 0 8px var(--gold));
  transform: scale(1.1);
}
.rating-item:has(.rating-check:checked) {
  background: rgba(255, 204, 0, 0.15);
  border-color: var(--gold);
}
.stars-display {
  display: flex;
  gap: 4px;
  pointer-events: none; 
}
.stars-display svg {
  transition: all 0.3s ease;
  color: var(--gold); 
}
.checkmark {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: transparent;
  border: 2px solid var(--gold);
  border-radius: 6px;
  position: relative;
  transition: all 0.2s ease;
}
.rating-check {
  position: absolute;
  opacity: 0;
  width: 20px;
  height: 20px;
  cursor: pointer;
  z-index: 2;
}
.rating-check:checked ~ .checkmark {
  background-color: var(--gold);
}
.rating-check:checked ~ .checkmark::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #0b2a2e; 
  font-weight: 900;
  font-size: 14px;
}
#filter-select { display: none; }
.dropdown-box {
  display: none; 
  position: absolute;
  top: 50px; 
  right: 0;
  width: 300px;
  background: rgba(29, 186, 210, 0.75); 
  backdrop-filter: blur(12px);       
  -webkit-backdrop-filter: blur(12px); 
  border: 1px solid rgb(255, 255, 255); 
  border-radius: 20px;
  padding: 20px;
  z-index: 100000; 
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  cursor: default;
}
.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 -20px 20px -20px; 
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 10px;
  border-radius: 12px; 
  transition: all 0.3s ease;
  color: white;
  cursor: pointer;
  font-weight: 500;
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff !important; 
}
.dropdown-item .icon {
  background: rgba(255, 255, 255, 0.1); 
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px; 
  font-size: 1.1rem;
  flex-shrink: 0; 
}
#sub-categories .dropdown-item {
  font-size: 0.9rem;
  padding: 10px 12px;
  opacity: 1;
  display: flex;
  justify-content: space-between; 
  align-items: center;
  cursor: pointer; 
}
#sub-categories .dropdown-item label {
  color: #ffffff !important;
  text-shadow: none !important; 
  cursor: pointer;
  flex-grow: 1;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0; 
}
.cat-check {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--dynamic-color);
  margin-left: 15px; 
}
.cat-item span:first-child {
  font-family: 'Space Mono', monospace;
  font-weight: 600;
  text-transform: uppercase;
  --outline: -0.5px -0.5px 0 #151010, 0.5px -0.5px 0 #000000, -0.5px 0.5px 0 #000, 0.5px 0.5px 0 #000;
  transition: text-shadow 0.3s ease;
}
.cat-item.nazisme span:first-child { font-family: 'Cinzel', serif; color: #f26d6d; text-shadow: var(--outline), 0 0 3px #f26d6d; }
.cat-item.nazisme:hover span:first-child { font-family: 'Cinzel', serif;text-shadow: var(--outline), 0 0 12px #f26d6d; }
.cat-item.algérie span:first-child { font-family: 'Cinzel', serif;color: #00bb06; text-shadow: var(--outline), 0 0 3px #00bb06; }
.cat-item.algérie:hover span:first-child { font-family: 'Cinzel', serif;text-shadow: var(--outline), 0 0 12px #00bb06; }
.cat-item.islam span:first-child {font-family: 'Cinzel', serif; color: #00ff8c; text-shadow: var(--outline), 0 0 3px #00ff8c; }
.cat-item.islam:hover span:first-child {font-family: 'Cinzel', serif; text-shadow: var(--outline), 0 0 12px #00ff8c; }
.cat-item.philosophie span:first-child { font-family: 'Cinzel', serif;color: #00e5ff; text-shadow: var(--outline), 0 0 3px #00e5ff; }
.cat-item.philosophie:hover span:first-child { font-family: 'Cinzel', serif;text-shadow: var(--outline), 0 0 12px #00e5ff; }
.cat-item.art span:first-child { font-family: 'Cinzel', serif;color: #ffff00; text-shadow: var(--outline), 0 0 3px #ffff00; }
.cat-item.art:hover span:first-child {font-family: 'Cinzel', serif; text-shadow: var(--outline), 0 0 12px #ffff00; }
.cat-item.europe span:first-child { font-family: 'Cinzel', serif;color: #ff7c1f; text-shadow: var(--outline), 0 0 3px #ff7c1f; }
.cat-item.europe:hover span:first-child { font-family: 'Cinzel', serif;text-shadow: var(--outline), 0 0 12px #ff7c1f; }
.cat-item input {
  display: none;
}
.cat-item .checkmark {
  position: relative;
}
.cat-item .checkmark::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  font-size: 14px;
  font-weight: bold;
  color: white;
  opacity: 0;
}
.cat-item input:checked + .checkmark {
  background-color: #f26d6d;
}
.cat-item input:checked + .checkmark::after {
  opacity: 1;
}
.cat-item.nazisme { color: #f26d6d; }
.cat-item.algérie { color: #00bb06; }
.cat-item.islam { color: #00ff8c; }
.cat-item.philosophie { color: #00e5ff; }
.cat-item.art { color: #ffff00; }
.cat-item input:checked + .checkmark {
  background-color: currentColor;
  border-color: currentColor;
}
.cat-item:hover span:first-child {
  text-shadow: 0 0 12px currentColor,
               0 0 25px currentColor;
}
.main-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 40px;
  width: 100%;             
  max-width: 100vw;        
  box-sizing: border-box;
  position: relative;      
  padding: 15px 0 ;
}
.copyright {
  flex: 1;                
  text-align: left;
}
.footer-copyright {
  display: block; 
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
}
#contact-btn {
  margin-left: auto;      
  flex-shrink: 0;         
}
.footer-pill {
  height: 36px;              
  padding: 0 20px;
  font-size: 0.75rem;
  letter-spacing: 1px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4),
              0 0 8px rgba(0, 212, 255, 0.2);
}
.footer-pill:hover {
  background: var(--dynamic-color);
  color: #0b2a2e;
  box-shadow: 0 0 20px var(--dynamic-color);
}
.main-footer .footer-pill {
  opacity: 0.85;
}
.main-footer .footer-pill:hover {
  opacity: 1;
}
.contact-modal {
  max-width: 420px;
  width: 90%;
  padding: 24px;
  text-align: center;
}
.contact-modal h2 {
  margin-bottom: 20px;
  letter-spacing: 2px;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 12px;
  color: white;
  font-size: 0.9rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--dynamic-color);
  box-shadow: 0 0 8px var(--dynamic-color);
}
.close-modal {
  position: absolute;
  top: 12px;
  right: 16px;
  cursor: pointer;
  font-size: 1.4rem;
}
.key-modal-content {
  background: rgba(101, 237, 255, 0.087); 
  backdrop-filter: blur(30px) saturate(150%);       
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  padding: 60px 40px;
  border-radius: 30px;
  border: 1px solid rgb(255, 255, 255);
  width: 90%;
  max-width: 900px;
  position: relative;
  box-shadow: 0 40px 100px #4dacff38;
  color: rgb(255, 253, 253);
}
#close-key {
  position: absolute;
  top: 30px;
  left: 30px;
  width: 45px;
  height: 45px;
  border: 2px solid #00e5ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00e5ff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
  transition: all 0.3s ease;
}
#close-key:hover {
  background: #00e5ff;
  color: #0b2a2e;
  box-shadow: 0 0 25px #00e5ff;
}
.key-preview-card {
  width: 200px; 
  height: 260px;
  margin: 0 auto 30px; 
  background: rgba(255, 255, 255, 0.03); 
  border: 1.5px solid rgba(0, 229, 255, 0.5); 
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
  padding: 15px;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}
.preview-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.5;
}
.preview-symbol {
  font-size: 2.8rem; 
  font-weight: 700;
  text-align: center;
  flex-grow: 1; 
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}
.preview-title {
  font-size: 0.8rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
  opacity: 0.8;
}
.key-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px; 
  max-width: 600px; 
  margin: 0 auto;
}
.key-item {
  display: flex;
  flex-direction: column;
  padding: 10px 15px; 
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease;
}
.key-item:hover {
  transform: scale(1.05);
}
.key-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
  pointer-events: none;
}
.key-number {
 font-size: 1.5rem; 
  font-weight: 800;
  line-height: 1;
  margin-bottom: 5px;
}
.key-label {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: capitalize;
}
.key-algérie { 
    background: rgba(0, 187, 6, 0.928); 
    box-shadow: 0 0 20px rgba(0, 187, 6, 0.4); 
    border-color: #00ff08;
}
.key-nazisme { 
    background: rgba(255, 0, 0, 0.88); 
    box-shadow: 0 0 20px rgba(255, 45, 45, 0.4);
    border-color: #ff5e5e;
}
.key-islam { 
    background: rgba(0, 255, 140, 0.834); 
    box-shadow: 0 0 20px rgba(0, 255, 140, 0.4);
    border-color: #5effb6;
}
.key-europe { 
    background: rgb(255, 124, 31); 
    box-shadow: 0 0 20px rgba(255, 124, 31, 0.4);
    border-color: #ff6a00;
}
.key-art { 
    background: rgba(255, 255, 0, 0.871); 
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.618);
    border-color: #ffff80;
    color: #0b2a2e; 
}
.key-philosophie { 
    background: rgba(0, 229, 255, 0.841); 
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    border-color: #80f3ff;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
  .main-footer {
    padding: 15px !important;
    display: flex !important;
    justify-content: flex-start !important; 
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .footer-pill {
    height: 40px !important; 
    flex: 1 !important; 
    max-width: 120px !important; 
    font-size: 0.75rem !important;
    padding: 0 15px !important;
    border-width: 2px !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 ;
    text-align: center;
  }
.hover-card {
  z-index: 9999;
}
.welcome-content {
  background: linear-gradient(135deg, rgba(11, 42, 46, 0.98), rgba(5, 20, 22, 0.98));
  width: 90%;
  max-width: 500px;
  padding: 40px;
  border-radius: 20px;
  border: 2px solid var(--dynamic-color);
  text-align: center;
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.3);
  animation: modalFadeIn 0.5s ease-out;
}
.chem-box-welcome {
  width: 60px;
  height: 60px;
  border: 3px solid var(--glow-color);
  color: var(--glow-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
  font-weight: bold;
  background: rgba(0, 255, 140, 0.1);
}
.welcome-content h2 {
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 20px;
  color: #fff;
}
.welcome-content p {
  line-height: 1.6;
  color: rgba(230, 242, 243, 0.8);
  margin-bottom: 30px;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#welcome-modal {
    display: none; 
    opacity: 0;    
    position: fixed;
    inset: 0;
    z-index: 99999; 
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}
#welcome-modal.active {
    opacity: 1;
    visibility: visible;
}
.welcome-content #close-welcome {
    margin: 0 auto;
    min-width: 200px;
}
.welcome-content h2 {
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
  opacity: 0; 
}
.welcome-content p {
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.5s;
  opacity: 0;
}
.welcome-content .chem-box-welcome {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}
.welcome-content #close-welcome {
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.8s;
  opacity: 0;
}
#close-welcome {
  box-shadow: 0 0 10px var(--dynamic-color);
  transition: box-shadow 0.3s ease;
}
#close-welcome:hover {
  box-shadow: 0 0 25px var(--dynamic-color), inset 0 0 10px white;
}
.potion-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: none;
  border: none;
  overflow: visible;
  animation: containerFloat 3s infinite ease-in-out;
}
.potion-container:hover {
  transform: scale(1.2) rotate(15deg);
}
.fiole {
  position: relative;
  width: 40px;
  height: 50px;
  border-radius: 5px 5px 20px 20px;
  border: 2px solid #e6f2f3;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: potionGlow 2s infinite ease-in-out, potionSwing 4s infinite ease-in-out;
  transform-origin: center bottom;
}
.liquide {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 70%;
  background: var(--glow-color);
  box-shadow: inset 0 0 15px rgba(255,255,255,0.5);
  animation: vagues 2s infinite ease-in-out;
}
@keyframes containerFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes potionGlow {
  0%, 100% { box-shadow: 0 0 10px var(--glow-color); }
  50% { box-shadow: 0 0 25px var(--glow-color); }
}
@keyframes potionSwing {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(-5deg); }
  75% { transform: rotate(3deg); }
}
@keyframes vagues {
  0%, 100% { clip-path: polygon(0% 15%, 15% 15%, 30% 10%, 45% 15%, 60% 20%, 75% 15%, 90% 10%, 100% 15%, 100% 100%, 0% 100%); }
  50% { clip-path: polygon(0% 10%, 15% 15%, 30% 20%, 45% 15%, 60% 10%, 75% 15%, 90% 20%, 100% 15%, 100% 100%, 0% 100%); }
}
@keyframes transmutationFlash {
  0% { filter: brightness(1); }
  25% { filter: brightness(2) saturate(2); box-shadow: 0 0 20px var(--glow-color); }
  50% { filter: brightness(1); }
  75% { filter: brightness(2) saturate(2); box-shadow: 0 0 20px var(--glow-color); }
  100% { filter: brightness(1); }
}
.transmuting {
  animation: transmutationFlash 0.3s ease-in-out 3;
}
.bubble {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1001;
  opacity: 0.8; 
  border: 1px solid rgba(167, 255, 123, 0.3); 
  animation: bubbleRise 1s ease-out forwards;
  left: 50%;
  top: 10px; 
  transform: translateX(-50%);
}
@keyframes bubbleRise {
  0% {
    transform: translateY(0) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(var(--random-x));
    opacity: 0;
    scale: 1.2;
  }
}
.potion-active {
  animation: shake 0.2s infinite;
}
@keyframes shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}
.fiole::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #e6f2f3;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}
@media (hover: hover) and (pointer: fine) {
  .pill-button,
  .filter-wrapper {
    text-shadow: 0 0 8px var(--dynamic-color);
    box-shadow:
      inset 0 0 10px rgba(0, 0, 0, 0.5),
      0 0 10px rgba(0, 212, 255, 0.2);
  }
  .pill-button:hover,
  .filter-wrapper:hover {
    background-color: var(--dynamic-color);
    color: #0b2a2e;
    box-shadow: 0 0 25px var(--dynamic-color);
    text-shadow: none;
  }
  .cell:hover {
    transform: scale(1.15);
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
  .cell:hover::after {
    transform: scale(1.1);
    box-shadow: 0 0 5px currentColor;
  }
}
@media (hover: none) and (pointer: coarse) {
  .cell:hover {
    transform: none;
    z-index: 1;
    box-shadow: none;
  }
  .rating-item:hover,
  .potion-container:hover {
    transform: none;
    background: transparent;
  }
}
@media (max-width: 768px) {
  .header-title {
    padding: 15px;
    text-align: center;
  }
  .header-title h1 {
    font-size: 1.6rem;
    line-height: 1.4;
  }
  .mobile-break {
    display: block;
    margin-top: 10px;
  }
  .chem-box {
    display: inline-flex;
    vertical-align: middle;
  }
  .page-content {
    padding: 10px;
  }
  .main-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
  }
  .header-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
  }
  .pill-button,
  .filter-wrapper {
    width: 100%;
    max-width: 280px;
    height: 50px;
    font-size: 0.9rem;
    border-radius: 25px;
    flex: none;
  }
  .table-scroll-area {
    overflow-x: auto;
    padding: 10px 0;
  }
  .table {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 135px;
    gap: 8px;
    width: 100%;
    padding: 5px;
  }
  .cell {
    width: 100%;
    height: 100%;
    min-height: 135px;
    padding: 8px 4px;
    border-radius: 4px;
    transform: none;
  }
  .code {
    font-size: 1.4rem;
  }
  .title {
    font-size: 0.55rem;
    line-height: 1.1;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .modal {
    align-items: flex-end;
  }
  .modal-content {
    width: 100%;
    height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    overflow-y: auto;
  }
  .modal-body {
    flex-direction: column;
  }
  #modal-image {
    width: 100%;
    height: auto;
  }
  #modal-img-main {
    width: 100%;
    max-width: 220px; 
    height: 340px;    
    margin: 0 auto 15px auto;
  }
    .footer-copy {
    display: none;
  }
  .btn-buy-now {
  background: rgba(255, 121, 37, 0.802) !important;
  border-color: #ff7c1f !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(255, 119, 22, 0.511);
  font-weight: 800;
  font-size: 0.9rem;          
  padding: 8px 12px;          
  border-radius: 10px;        
  text-transform: uppercase;  
  transition: all 0.3s ease;  
}
  }
  .contact-modal {
    position: fixed;       
    bottom: 20px;          
    left: 15px;            
    right: auto;           
    width: 90%;            
    max-width: 350px;      
    padding: 20px;
    border-radius: 15px;   
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    text-align: left;      
    transform: translateX(-50%);
    max-height: 80vh;   
    overflow-y: auto;   
    animation: slideUp 0.4s ease-out forwards
  }
   @keyframes slideUp {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .contact-modal h2 {
    font-size: 1.2rem;
  }
  .contact-form input,
  .contact-form textarea {
    font-size: 0.85rem;
    padding: 10px;
  }
  .main-footer {
    flex-direction: row;        
    justify-content: flex-start; 
    padding: 15px 20px;
  }
 #contact-btn {
    margin-left: auto; 
    flex-shrink: 0;
  }
   .copyright {
    flex: 1;                    
    text-align: left;
  }
  .footer-pill {
    max-width: 120px;
    flex: 0 0 auto;             
  }
  .key-modal-content {
    position: relative;
    padding-top: 70px; 
  }
  #close-key {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 20;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 10px;
    backdrop-filter: blur(6px);
  }
  .key-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px; 
    margin-top: 20px;
  }
  .key-item {
    min-height: 78px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .key-number {
    font-size: 1.1rem;
    margin-bottom: 4px;
  }
  .key-label {
    font-size: 0.75rem;
    line-height: 1.1;
  }
.potion-container {
    animation: containerFloat 3s infinite ease-in-out, potionBounce 1s ease-out;
  }
  @keyframes potionBounce {
    0% { transform: translateY(50px); opacity: 0; }
    60% { transform: translateY(-10px); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
  }
.modal-reviews {
  margin-top: 40px;
  padding-top: 20px;
  min-height: 300px; 
}
.review-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin-bottom: 25px;
}
.review-divider::before, .review-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.review-divider span {
  padding: 0 15px;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--gold, #ffcc00);
  letter-spacing: 2px;
}
#disqus_thread {
  width: 100%;
  color-scheme: dark; 
}
.reaction-section {
  background: rgba(0, 0, 0, 0.2); 
  border-radius: 12px;
  padding: 10px 15px;      
  margin: 0;               
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.reaction-title {
  font-size: 0.7rem;       
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;      
  opacity: 0.6;
}
.reaction-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.react-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  padding: 5px 12px;       
  font-size: 0.8rem;
  gap: 8px;
}
.react-btn:hover { transform: translateY(-3px); }
.react-btn.like:hover { 
  border-color: #00ff8c; 
  box-shadow: 0 0 15px rgba(0, 255, 140, 0.3);
}
.react-btn.dislike:hover { 
  border-color: #ff4b2b; 
  box-shadow: 0 0 15px rgba(255, 75, 43, 0.3);
}
.count { font-family: 'Space Mono', monospace; font-weight: bold; }
.react-btn:disabled, .react-btn[style*="pointer-events: none"] {
    cursor: not-allowed;
    filter: grayscale(0.8);
}
.voted-success {
    animation: pulse-gold 0.5s ease-in-out;
}
@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.7); }
    100% { box-shadow: 0 0 0 15px rgba(255, 204, 0, 0); }
}
.icon-svg {
  width: 18px;             
  height: 18px;
  transition: transform 0.2s ease, stroke 0.3s ease;
}
.react-btn.like:hover .icon-svg {
  stroke: #00ff8c; 
  transform: translateY(-3px) rotate(-10deg);
  filter: drop-shadow(0 0 8px rgba(0, 255, 140, 0.4));
}
.react-btn.dislike:hover .icon-svg {
  stroke: #ff4b2b; 
  transform: translateY(3px) rotate(10deg);
  filter: drop-shadow(0 0 8px rgba(255, 75, 43, 0.4));
}
.react-btn[style*="pointer-events: none"] .icon-svg {
  stroke: #555; 
}
