/* Global Styles */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #FFD2FC;
    --dark-color: #1E1E2C;
    --light-color: #F9F7FF;
    --accent-color: #FF6B6B;
    --text-color: #1E1E2C;
    --text-light: #777;
    --border-color: #FF6B6B;
    --background-dark: #121218;
    --card-background: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #b3b3cc;
    --success-color: #4cd964;
    --danger-color: #ff3b30;
    --warning-color: #ffcc00;
    --info-color: #5ac8fa;
    --btn-navbar:#ff5252;
    --btn-navbar2:#ff3b30;

    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --chat-width: 350px;
    --chat-height: 500px;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--text-color);
    line-height: 1.6;
}

body.dark-mode {
     --primary-color: #8C52FF;
    --secondary-color: #503795;
    --dark-color: #121218;
    --light-color: #1E1E2C;
    --text-color: #e0e0e0;
    --text-light: #aaa;
    --border-color: #8C52FF;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background-color: #121218;
    --card-background: #1e1e2a;
    --btn-navbar:#503795;
    --btn-navbar2:#8C52FF;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
}

/* Header and Navigation */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

body.dark-mode header {
    background-color: var(--dark-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.main-nav  {
    display: flex;
    gap: 2rem;
}

.main-header ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.main-header ul li a:hover {
    color: var(--primary-color);
}

.main-header ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.main-header ul li a:hover::after {
    width: 100%;
}

.right-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-container {
    position: relative;
}

.search-container input {
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    background-color: #f5f5f5;
    color: var(--text-color);
    transition: var(--transition);
    width: 180px;
}

body.dark-mode .search-container input {
    background-color: #2a2a38;
    border-color: #444;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(140, 82, 255, 0.2);
    width: 220px;
}

.search-container i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.toggle {
    width: 40px;
    height: 20px;
    background-color: #ddd;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.toggle::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

.toggle.active {
    background-color: var(--primary-color);
}

.toggle.active::before {
    left: 22px;
}

.mode-button {
    background: none;
    color: var(--text-color);
    font-size: 1.2rem;
    padding: 5px;
    border-radius: 50%;
}

.mode-button:hover {
    color: var(--primary-color);
}

body.dark-mode .mode-button i.fa-sun {
    display: none;
}

body.dark-mode .mode-button i.fa-moon {
    display: block;
}

.mode-button i.fa-moon {
    display: none;
}

body.dark-mode .mode-button:hover {
    color: #FFC107;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-btn {
    background-color: transparent;
    color: var(--text-color);
    /* border: 1px solid var(--border-color); */
}

.login-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.signup-btn {
    background-color: var(--primary-color);
    color: white;
}

.signup-btn:hover {
    background-color: var(--secondary-color);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
}

.primary-btn:hover {
    background-color: var(--btn-navbar);
    color: white;
}

.secondary-btn {
    background-color: transparent;
    color: white;
    border: 1px solid var(--text-primary);
    padding: 0.8rem 1.5rem;
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.modal2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100;
}

.modal2-content {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid var(--border-color);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
  }
  
  .modal2 h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary-color);
  }
  
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
  }
  
  .form-group input {
    width: 100%;
    padding: 0.8rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: var();
    color: var(--text-color);
  }
  
   .form-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-color);
  }
  
  .form-footer a {
    color: var(--text-color);
    font-weight: 500;
  }
  .form-footer a:hover{
    color: var(--border-color);
  }


/* Footer */
footer {
    background-color: var(--card-background);
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.company-info h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.company-info p {
    color: var(--text-color);
    max-width: 400px;
}

.footer-links h4 {
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: var(--text-color);
    transition: all 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-links ul li a i {
    margin-right: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Auto-growing Textarea */
textarea {
    min-height: 20px;
    max-height: 120px;
    overflow-y: auto;
}

/* Banner area */
.banner-area {
    width: 100%;
    height: 200px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.banner-text {
    color: #9ca3af;
    font-size: 16px;
}

/* Filter Section - Updated to match image */
.filter-section {
    background-color: transparent;
    padding: 20px 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    display: block;
    margin-bottom: 10px;
}

.filter-select-container {
    position: relative;
}

.filter-select {
    padding: 8px 12px;
    padding-right: 30px;
    border-radius: 4px;
    border: 1px solid #2a3749;
    background-color: white;
    color: #1e1e2c;
    cursor: pointer;
    width: 100%;
    appearance: none;
}

.search-container2 {
    position: relative;
}

.search-box {
    padding: 8px 12px 8px 35px;
    border-radius: 4px;
    border: 1px solid #2a3749;
    background-color: white;
    color: var(--text-color);
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
}

.dropdown-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
}

.filter-item {
    width: 200px;
}

.view-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #e6e6e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all {
    font-size: 14px;
    color: #a78bfa;
    text-decoration: none;
}

.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    background-color: transparent;
}

.manga-card {
    border-radius: 8px;
    overflow: hidden;
    background-color: transparent;
    transition: transform 0.3s;
}

.manga-card:hover {
    transform: translateY(-5px);
}

.manga-image {
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: white;
}

.reading {
    background-color: #4caf50;
}

.completed {
    background-color: #2196f3;
}

.plan {
    background-color: #9c27b0;
}

.onhold {
    background-color: #ff9800;
}

.dropped {
    background-color: #f44336;
}

.manga-info {
    padding: 12px;
}

.manga-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manga-meta {
    font-size: 12px;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
}

.rating {
    color: #f59e0b;
    font-weight: 500;
}

.status-selector {
    width: 100%;
    margin-top: 8px;
    padding: 5px;
    border-radius: 4px;
    border: none;
    background-color: #374151;
    color: #e6e6e6;
    cursor: pointer;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #a78bfa;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

/* No results */
.no-results {
    text-align: center;
    padding: 40px;
    background-color: #1f2937;
    border-radius: 8px;
    margin-bottom: 40px;
}

.no-results h3 {
    margin-bottom: 10px;
    color: #e6e6e6;
}

.no-results p {
    color: #9ca3af;
}

/* Updated trending section */
.trending-section {
    background-color: transparent;
    padding: 20px 80px;
    margin-bottom: 20px;
}

.trending-title {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.trending-card {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.trending-card:hover {
    transform: translateY(-5px);
}

.trending-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a78bfa;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

/* Loading indicator */
.loading {
    text-align: center;
    padding: 40px;
    color: #a78bfa;
}

 @media (max-width: 576px) {
    .category-grid,
    .character-grid {
      grid-template-columns: 1fr;
    }
  
    .hero {
      height: 400px;
    }
  
    .hero h1 {
      font-size: 1.8rem;
    }
  
    .hero p {
      font-size: 1rem;
    }
  
    .footer-content {
      grid-template-columns: 1fr;
    }
  
    .info-row {
      flex-direction: column;
    }
  
    .info-label {
      min-width: auto;
    }
  
    .info-value {
      margin-bottom: 0.5rem;
    }
  }
