* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
    --primary-color: rgba(255, 8, 8, 0.397);
	  --secondary-color: rgba(223, 17, 103, 0.521);
}

::selection {
    background-color: white;
    color: black;
}

body {
  font-family: monospace;
  background: black;
  color: #ffffff;
  min-height: 100vh;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--primary-color);
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 200px;
  right: 0;
  z-index: 1000;
  height: 80px;
}

.logo h1 {
  color: var(--secondary-color);
  font-size: 1.5rem;
  font-weight: bold;
}

.logo .japanese-on {
  font-size: 1rem;
  color: #cccccc;
  margin-left: 0.5rem;
}

.search-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 0.5rem;
  border: 1px solid #333;
  flex: 1;
  max-width: 400px;
  margin: 0 2rem;
}

#searchInput {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  padding: 0.5rem 1rem;
  flex: 1;
  font-size: 1rem;
}

#searchInput::placeholder {
  color: #aaa;
}

#searchBtn {
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}

#searchBtn:hover {
  background: #cc0000;
}

#langToggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
}

#langToggle:hover {
  background: var(--primary-color);
}

/* Main Layout */
.main-layout {
  display: flex;
  flex: 1;
}

/* Sidebar */
.sidebar {
  width: 200px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-right: 2px solid var(--primary-color);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 999;
}

.sidebar-header {
  padding: 0 0.75rem;
  margin-bottom: 1rem;
}

.sidebar-header .japanese-on {
  font-size: 0.8rem;
  color: #cccccc;
  margin-left: 0.5rem;
}

.sidebar-header h3 {
  color: var(--secondary-color);
  font-size: 1.2rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}

.nav-menu {
  list-style: none;
  margin-bottom: 1rem;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-item a {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  color: #cccccc;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.nav-item:hover a,
.nav-item.active a {
  background: rgba(255, 0, 0, 0.1);
  border-left-color: var(--secondary-color);
  color: white;
}

.nav-item .icon {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.nav-item .jp-on {
  font-size: 0.9rem;
  color: #999;
  display: block;
}

.study-tools {
  padding: 0 0.75rem;
  border-top: 1px solid #333;
  padding-top: 1rem;
}

.study-tools h4 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.tool-btn {
  display: block;
  width: 100%;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid var(--primary-color);
  color: white;
  padding: 0.5rem;
  margin-bottom: 0.25rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.8rem;
}

.tool-btn:hover {
  background: rgba(255, 0, 0, 0.2);
}

/* Main Content */
.content {
  flex: 1;
  margin-left: 200px;
  margin-top: 80px; /* Space for fixed header */
  overflow-y: auto;
}

.content-wrapper {
  padding: 2rem;
}

.hero-section {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-section h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
  font-size: 1.2rem;
  color: #cccccc;
  margin-bottom: 0.5rem;
}

.japanese-subtitle {
  font-size: 1rem;
  color: #999;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.card {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: #ff0000;
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.card h3 {
  color: #ff0000;
  margin-bottom: 1rem;
}

.recent-updates {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 1rem 2rem 1rem 2rem;
  border: 1px solid #333;
}

.recent-updates h3 {
  color: #ff0000;
  margin-bottom: 1.5rem;
}

.update-list {
  margin: 0;
  padding: 0;
}

.update-item {
  display: flex;
  padding: 1rem 0;
  border-bottom: 1px solid #333;
  margin: 0;
}

.update-item:last-child {
  border-bottom: none;
}

.update-item .date {
  color: #ff0000;
  font-weight: bold;
  margin-right: 1rem;
  min-width: 100px;
  flex-shrink: 0;
}

.update-item .content {
  color: #cccccc;
  flex: 1;
  margin-top: 0;
}

.category-message {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid #ff0000;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    z-index: 1001;
    transition: left 0.3s;
  }

  .top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    height: auto;
  }

  .content {
    margin-left: 0;
    margin-top: 120px; /* Adjust for mobile header height */
  }

  .main-layout {
    flex-direction: column;
  }

  .search-container {
    margin: 0;
    max-width: none;
  }

  .hero-section h2 {
    font-size: 2rem;
  }

  .feature-cards {
    grid-template-columns: 1fr;
  }

  .content-wrapper {
    padding: 1rem;
  }

  .category-message {
    margin: 1rem;
  }
}

/* Hide Japanese text by default */
.japanese,
.jp {
  display: none;
}

.english,
.en {
  display: block;
}