:root {
  --primary-teal: #006b7d;
  --secondary-emerald: #00a693;
  --electric-blue: #00d9ff;
  --accent-coral: #ff6b6b;
  --accent-amber: #ffb627;
  --deep-navy: #0f1419;
  --pearl-white: #fdfefe;
  --sage-green: #95b8a3;
  --aurora-gradient: linear-gradient(
    135deg,
    #006b7d 0%,
    #00a693 25%,
    #00d9ff 50%,
    #ff6b6b 75%,
    #ffb627 100%
  );
  --midnight-gradient: linear-gradient(135deg, #0f1419 0%, #006b7d 100%);
  --success-green: #28a745;
  --warning-orange: #ffc107;
  --danger-red: #dc3545;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--deep-navy);
  color: var(--pearl-white);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: rgba(15, 20, 25, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 169, 147, 0.2);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--aurora-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: breathe 4s ease-in-out infinite;
  cursor: pointer;
  text-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.05);
    filter: brightness(1.2);
  }
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--sage-green);
  text-decoration: none;
  font-weight: 500;
  padding: 0.8rem 1.2rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-size: 0.9rem;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 217, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--pearl-white);
  background: linear-gradient(
    135deg,
    rgba(0, 107, 125, 0.3),
    rgba(0, 166, 147, 0.3)
  );
  border: 1px solid rgba(0, 217, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 217, 255, 0.2);
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--aurora-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 2px solid rgba(0, 217, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.4);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--sage-green);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Main Content */
.main-content {
  margin-top: 80px;
  min-height: 100vh;
}

.section {
  display: none;
  padding: 2rem 0;
  animation: fadeInUp 0.6s ease-out;
}

.section.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  background: var(--midnight-gradient);
  border-radius: 30px;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(0, 217, 255, 0.1),
    transparent
  );
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  background: var(--aurora-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 50px rgba(0, 217, 255, 0.3);
}

.hero-subtitle {
  font-size: 1.4rem;
  color: var(--sage-green);
  max-width: 800px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-stat {
  background: rgba(0, 107, 125, 0.2);
  border: 1px solid rgba(0, 169, 147, 0.3);
  border-radius: 20px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.hero-stat:hover {
  transform: translateY(-5px);
  border-color: var(--electric-blue);
  box-shadow: 0 15px 35px rgba(0, 217, 255, 0.2);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--electric-blue);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--sage-green);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.content-card {
  background: rgba(0, 107, 125, 0.1);
  border: 1px solid rgba(0, 107, 125, 0.2);
  border-radius: 25px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(15px);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.content-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(0, 166, 147, 0.1),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.content-card:hover::before {
  opacity: 1;
  animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.content-card:hover {
  transform: translateY(-15px) scale(1.02);
  border-color: var(--electric-blue);
  box-shadow: 0 30px 60px rgba(0, 217, 255, 0.3);
}

.card-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.card-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pearl-white);
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.card-description {
  color: var(--sage-green);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

.card-features {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature-tag {
  background: rgba(0, 166, 147, 0.2);
  color: var(--secondary-emerald);
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(0, 166, 147, 0.3);
}

.card-button {
  background: var(--aurora-gradient);
  color: var(--deep-navy);
  padding: 1rem 2rem;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.card-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.card-button:hover::before {
  left: 100%;
}

.card-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 217, 255, 0.4);
}

/* Digital Library Specific Styles */
.library-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.library-stat-card {
  background: rgba(0, 107, 125, 0.1);
  border: 1px solid rgba(0, 107, 125, 0.2);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.library-stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--electric-blue);
  box-shadow: 0 15px 35px rgba(0, 217, 255, 0.2);
}

.library-icon {
  font-size: 2.5rem;
  color: var(--electric-blue);
  margin-bottom: 1rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.library-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--pearl-white);
  margin-bottom: 0.5rem;
}

.library-label {
  color: var(--sage-green);
  font-size: 0.9rem;
}

.library-change {
  font-size: 0.8rem;
  color: var(--success-green);
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Community Styles */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.community-card {
  background: rgba(0, 107, 125, 0.1);
  border: 1px solid rgba(0, 107, 125, 0.2);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.community-card:hover {
  transform: translateY(-8px);
  border-color: var(--electric-blue);
  box-shadow: 0 20px 40px rgba(0, 217, 255, 0.2);
}

.community-header {
  padding: 2rem;
  background: linear-gradient(
    135deg,
    rgba(0, 107, 125, 0.2),
    rgba(0, 169, 147, 0.1)
  );
  position: relative;
}

.community-flag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
}

.community-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--pearl-white);
  margin-bottom: 0.5rem;
}

.community-subtitle {
  color: var(--sage-green);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.community-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.community-body {
  padding: 2rem;
}

.community-stats-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mini-stat {
  text-align: center;
  padding: 1rem;
  background: rgba(0, 169, 147, 0.1);
  border-radius: 10px;
}

.mini-stat-number {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--electric-blue);
  margin-bottom: 0.3rem;
}

.mini-stat-label {
  font-size: 0.7rem;
  color: var(--sage-green);
}

/* Pricing Section */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.pricing-card {
  background: rgba(0, 107, 125, 0.1);
  border: 2px solid rgba(0, 107, 125, 0.2);
  border-radius: 25px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pricing-card.featured {
  border-color: var(--electric-blue);
  background: linear-gradient(
    135deg,
    rgba(0, 107, 125, 0.2),
    rgba(0, 166, 147, 0.1)
  );
  transform: scale(1.05);
}

.pricing-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--electric-blue);
  box-shadow: 0 25px 50px rgba(0, 217, 255, 0.3);
}

.pricing-header {
  margin-bottom: 2rem;
}

.pricing-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pearl-white);
  margin-bottom: 0.5rem;
}

.pricing-subtitle {
  color: var(--sage-green);
  font-size: 0.9rem;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--electric-blue);
  margin: 1.5rem 0;
}

.pricing-period {
  font-size: 1rem;
  color: var(--sage-green);
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.5rem 0;
  color: var(--sage-green);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-features .check {
  color: var(--success-green);
  font-weight: bold;
}

.pricing-button {
  width: 100%;
  background: var(--aurora-gradient);
  color: var(--deep-navy);
  padding: 1rem 2rem;
  border: none;
  border-radius: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.pricing-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 217, 255, 0.4);
}

/* Search Modal */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 20, 25, 0.9);
  backdrop-filter: blur(10px);
  z-index: 2000;
  padding: 2rem;
}

.search-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-content {
  background: var(--deep-navy);
  border: 1px solid rgba(0, 169, 147, 0.3);
  border-radius: 25px;
  max-width: 800px;
  width: 100%;
  padding: 3rem;
  position: relative;
}

.search-header {
  text-align: center;
  margin-bottom: 2rem;
}

.search-title {
  font-size: 2rem;
  color: var(--electric-blue);
  margin-bottom: 1rem;
}

.search-box {
  position: relative;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  background: rgba(0, 107, 125, 0.2);
  border: 1px solid rgba(0, 169, 147, 0.3);
  color: var(--pearl-white);
  padding: 1.5rem 3rem 1.5rem 4rem;
  border-radius: 25px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--electric-blue);
  box-shadow: 0 0 25px rgba(0, 217, 255, 0.3);
}

.search-icon {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sage-green);
  font-size: 1.3rem;
}

.close-search {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--sage-green);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-search:hover {
  color: var(--accent-coral);
  background: rgba(255, 107, 107, 0.1);
}

/* Notification */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--secondary-emerald);
  color: var(--pearl-white);
  padding: 1rem 2rem;
  border-radius: 15px;
  z-index: 2001;
  transform: translateX(400px);
  transition: transform 0.4s ease;
  border: 1px solid rgba(0, 217, 255, 0.3);
  max-width: 350px;
  box-shadow: 0 10px 30px rgba(0, 166, 147, 0.3);
}

.notification.show {
  transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 20, 25, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 169, 147, 0.2);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    border-radius: 0 0 20px 20px;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card.featured {
    transform: none;
  }

  .library-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .community-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .notification {
    right: 10px;
    max-width: calc(100vw - 20px);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .library-stats {
    grid-template-columns: 1fr;
  }

  .community-stats-mini {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 1rem 0;
  }

  .container {
    padding: 0 15px;
  }
}

/* Loading Animation */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--sage-green);
}

.loading i {
  font-size: 3rem;
  animation: spin 2s linear infinite;
  color: var(--electric-blue);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Additional Animations */
.glow-effect {
  animation: continuousGlow 2s ease-in-out infinite alternate;
}

@keyframes continuousGlow {
  from {
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
  }
  to {
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.6);
  }
}

.bounce-in {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3) translateY(-50px);
    opacity: 0;
  }
  50% {
    transform: scale(1.05) translateY(-10px);
    opacity: 0.8;
  }
  70% {
    transform: scale(0.95) translateY(5px);
    opacity: 0.9;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
