/* Single Page CSS for Viral Cool Symbols
   Created: June 12, 2025
   For symbol category pages like chess.html */

/* Base Styles */
:root {
  --primary-color: #6a4bff;
  --secondary-color: #ff4bae;
  --gradient-start: #6a4bff;
  --gradient-end: #ff4bae;
  --background-color: #f8f9fa;
  --card-background: #ffffff;
  --text-color: #333333;
  --text-secondary: #666666;
  --border-color: #e1e4e8;
  --accent-color: #ff4bae;
  --header-height: 70px;
  --footer-height: 60px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
  --border-radius: 10px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --symbol-board-height: 80px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --background-color: #121212;
  --card-background: #1e1e1e;
  --text-color: #f0f0f0;
  --text-secondary: #b0b0b0;
  --border-color: #333333;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: var(--transition);
  padding-top: calc(var(--header-height) + var(--symbol-board-height));
  padding-bottom: calc(var(--footer-height) + 20px);
  overflow-x: hidden;
}

::selection {
  background-color: var(--primary-color);
  color: white;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  background-color: var(--card-background);
  box-shadow: var(--shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.logo:hover {
  transform: scale(1.05);
}

.logo-image {
  height: 60px; /* Updated to match header.css */
  width: auto;
  max-width: 150px; /* Control maximum width based on 400:160 aspect ratio */
  object-fit: contain; /* Ensures logo fits properly */
  margin-right: 10px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-button-container {
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-button {
  padding: 6px 12px; /* Reduced padding for better sizing */
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border: none;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px; /* Explicit font size */
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px; /* Reduced gap between icon and text */
  cursor: pointer;
  white-space: nowrap; /* Prevent text wrapping */
  min-height: 32px; /* Consistent height */
}

.nav-button i {
  font-size: 14px; /* Consistent icon size */
}

.nav-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.hamburger-menu {
  display: none;
  cursor: pointer;
}

.hamburger-icon {
  width: 30px;
  height: 20px;
  position: relative;
  transform: rotate(0deg);
  transition: var(--transition);
}

.hamburger-icon span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--text-color);
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: var(--transition);
}

.hamburger-icon span:nth-child(1) {
  top: 0px;
}

.hamburger-icon span:nth-child(2) {
  top: 8px;
}

.hamburger-icon span:nth-child(3) {
  top: 16px;
}

.hamburger-icon.open span:nth-child(1) {
  top: 8px;
  transform: rotate(135deg);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.hamburger-icon.open span:nth-child(3) {
  top: 8px;
  transform: rotate(-135deg);
}

/* Symbol Board Styles */
.symbol-board-controls {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--card-background);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 15px;
  transition: transform 0.3s ease-in-out;
  height: var(--symbol-board-height);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.symbol-board-controls.collapsed {
  transform: translateY(calc(-100% + 40px));
}

.symbol-board-toggle {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(106, 75, 255, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 101;
}

.symbol-board-toggle:hover {
  background-color: var(--primary-color);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 4px 12px rgba(106, 75, 255, 0.4);
}

.textarea-container {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 800px;
  align-items: center;
}

.symbol-board-textarea {
  flex: 1;
  height: 50px;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  resize: none;
  font-size: 16px;
  background-color: var(--card-background);
  color: var(--text-color);
  transition: var(--transition);
}

.symbol-board-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(106, 75, 255, 0.2);
}

.textarea-buttons {
  display: flex;
  gap: 10px;
}

.button {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  flex: none;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 90px;
  justify-content: center;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.button:active {
  transform: translateY(0);
}

.button.secondary {
  background: #888;
}

.button.secondary:hover {
  background: #666;
}

/* Main Content Styles */
.main-section {
  padding: 40px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.main-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(106, 75, 255, 0.15), transparent 70%);
  z-index: -1;
  opacity: 0.7;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: -0.5px;
  animation: fadeIn 1s ease-out;
}

.section-description {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
  color: var(--text-secondary);
  opacity: 0.9;
  animation: fadeIn 1s ease-out 0.3s both;
}

.hero-action {
  margin: 20px 0 40px;
  animation: fadeIn 1s ease-out 0.6s both;
}

.cta-button {
  padding: 12px 25px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(106, 75, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cta-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(106, 75, 255, 0.4);
}

.cta-button:active {
  transform: translateY(0) scale(0.98);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Symbols Container Styles */
.symbols-container {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin: 0 auto 40px;
  max-width: 900px;
  animation: slideUp 0.8s ease-out 0.5s both;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.symbols-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
}

.symbols-title {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--text-color);
  text-align: center;
  position: relative;
}

.symbols-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
  border-radius: 3px;
}

.symbols-grid-wrapper {
  position: relative;
  padding: 10px 0;
  width: 100%;
  overflow: hidden;
}

.symbols {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  width: 100%;
  align-items: stretch;
}

.symbol {
  min-height: 70px;
  height: auto;
  min-width: 70px;
  max-width: 400px;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px !important;
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  box-sizing: border-box;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.3;
  flex: 0 0 auto;
}

.symbol::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.symbol:hover {
  transform: translateY(-5px);
  color: white;
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.symbol:hover::before {
  opacity: 1;
}

.symbol-clicked {
  animation: pulse 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.symbols-info {
  margin-top: 25px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  opacity: 0.8;
  padding: 10px;
  background-color: rgba(106, 75, 255, 0.05);
  border-radius: var(--border-radius);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(106, 75, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(106, 75, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(106, 75, 255, 0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Additional Symbol Categories */
.additional-symbol-categories {
  padding: 60px 0;
  background-color: var(--background-color);
  position: relative;
}

.additional-symbol-categories::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

.text-center {
  text-align: center;
}

.additional-symbol-categories .section-title {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.additional-symbol-categories .section-description {
  margin-bottom: 40px;
  max-width: 600px;
}

.symbol-categories-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 0 auto;
  max-width: 1000px;
}

.symbol-category {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
  animation: fadeInStaggered 0.5s ease-out forwards;
  opacity: 0;
}

.symbol-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.symbol-category a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px 15px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  height: 100%;
  transition: var(--transition);
}

.symbol-category:hover a {
  color: var(--primary-color);
}

.category-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  transition: var(--transition);
}

.symbol-category:hover .category-icon {
  transform: scale(1.2);
}

.category-name {
  font-size: 1rem;
  text-align: center;
}

.view-more-button {
  margin-top: 40px;
  padding: 12px 25px;
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.view-more-button:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.view-more-button:hover i {
  transform: translateX(5px);
}

.view-more-button i {
  transition: transform 0.3s ease;
}

@keyframes fadeInStaggered {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* About Box */
.about-box {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 40px 30px;
  margin: 40px auto 80px;
  max-width: 900px;
  position: relative;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.about-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end));
}

.about-box .section-title {
  font-size: 2rem;
  margin-bottom: 20px;
}

.about-box .section-description {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.about-box .about-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  max-height: 400px;
  width: auto;
}

/* Footer Styles */
.footer {
  background-color: var(--card-background);
  padding: 0;
  position: fixed;
  bottom: 0;
  width: 100%;
  height: var(--footer-height);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 99;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-link:hover::after {
  width: 100%;
}

/* Notification Styles */
#notification {
  border-radius: var(--border-radius);
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#notification.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Share Section Styles */
.share-section {
  margin-top: 2rem;
  text-align: center;
}

.share-button {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.share-button:active {
  transform: translateY(0);
}

.share-button i {
  font-size: 1.1rem;
}

/* Mobile responsiveness for share button */
@media (max-width: 768px) {
  .share-section {
    margin-top: 1.5rem;
  }
  
  .share-button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* Responsive Styles */
@media (max-width: 992px) {
  .section-title {
    font-size: 2.5rem;
  }
  
  .symbols-container {
    padding: 25px;
  }
  
  .symbols {
    gap: 12px;
  }
}

@media (max-width: 768px) {  .section-title {
    font-size: 2rem;
  }
  
  .logo-image {
    height: 45px; /* Adjusted for responsive layout */
  }
  
  .nav-button {
    padding: 8px 12px; /* Slightly larger padding on mobile for touch */
    font-size: 14px;
    min-height: 36px;
  }
  
  .hamburger-menu {
    display: block;
  }
  
  .nav-button-container {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--card-background);
    padding: 20px;
    flex-direction: column;
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-button-container.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
    .symbols {
    gap: 10px;
  }
  
  .symbol {
    min-height: 60px;
    font-size: 14px !important;
  }
  
  .textarea-container {
    flex-direction: column;
  }
  
  .textarea-buttons {
    width: 100%;
  }  .symbol-board-controls {
    height: auto;
    padding: 12px 15px;
    flex-direction: column;
    gap: 10px;
  }
  
  .symbol-board-controls.collapsed {
    transform: translateY(calc(-100% + 50px));
  }
  
  .symbol-board-toggle {
    bottom: -25px;
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .textarea-container {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .textarea-buttons {
    display: flex;
    gap: 8px;
    width: 100%;
    justify-content: center;
  }
  
  .textarea-buttons .button {
    flex: 1;
    max-width: 120px;
    font-size: 12px;
    padding: 8px 12px;
  }
  
  .symbol-categories-container {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  
  .footer .container {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  body {
    padding-top: calc(var(--header-height) + var(--symbol-board-height));
  }
}

/* Enhanced mobile touch support for symbol board */
@media (max-width: 768px) {
  .symbol-board-toggle {
    min-height: 44px; /* iOS recommended touch target size */
    min-width: 120px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  .symbol-board-controls {
    -webkit-overflow-scrolling: touch;
  }
  
  .symbol-board-textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px;
    resize: none;
  }
  
  .textarea-buttons .button {
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  /* Improve animation performance on mobile */
  .symbol-board-controls,
  .symbol-board-toggle {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
  }
}

/* Force hardware acceleration for smooth animations */
.symbol-board-controls.collapsed {
  -webkit-transform: translateY(calc(-100% + 50px)) translateZ(0);
  transform: translateY(calc(-100% + 50px)) translateZ(0);
}

@media (min-width: 769px) {
  .symbol-board-controls.collapsed {
    -webkit-transform: translateY(calc(-100% + 40px)) translateZ(0);
    transform: translateY(calc(-100% + 40px)) translateZ(0);
  }
}

/* Symbol Table Styles */
.table-container {
  margin: 2rem auto;
  max-width: 800px;
  padding: 0 15px;
}

.table-container h4 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: var(--primary-color);
}

.symbol-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.symbol-table th,
.symbol-table td {
  padding: 12px 15px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.symbol-table th {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.symbol-table td:first-child {
  font-size: 1.8rem;
  font-weight: 400;
}

.symbol-table tbody tr:hover {
  background-color: rgba(106, 75, 255, 0.05);
}

.symbol-table tbody tr:last-child td {
  border-bottom: none;
}

/* Media query for responsive tables */
@media (max-width: 767px) {
  .symbol-table {
    font-size: 0.9rem;
  }
  
  .symbol-table th,
  .symbol-table td {
    padding: 8px 10px;
  }
  
  .symbol-table td:first-child {
    font-size: 1.5rem;
  }
}
