/* Root Variables for Themes */
:root {
  --primary-bg: #0a0a0f;
  --secondary-bg: rgba(15, 15, 25, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --accent-primary: #00d4ff;
  --accent-secondary: #ffd700;
  --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);
  --gradient-primary: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(255, 215, 0, 0.2) 100%);
}

[data-theme="light"] {
  --primary-bg: #f8f9fa;
  --secondary-bg: rgba(255, 255, 255, 0.9);
  --glass-bg: rgba(255, 255, 255, 0.3);
  --glass-border: rgba(0, 0, 0, 0.1);
  --text-primary: #2c3e50;
  --text-secondary: rgba(44, 62, 80, 0.7);
  --accent-primary: #3498db;
  --accent-secondary: #f39c12;
  --shadow-glow: 0 8px 32px rgba(52, 152, 219, 0.2);
  --gradient-primary: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(243, 156, 18, 0.1) 100%);
}

[data-theme="elegant"] {
  --primary-bg: #1a1a2e;
  --secondary-bg: rgba(16, 213, 194, 0.1);
  --glass-bg: rgba(16, 213, 194, 0.15);
  --glass-border: rgba(16, 213, 194, 0.3);
  --text-primary: #eee6ff;
  --text-secondary: rgba(238, 230, 255, 0.8);
  --accent-primary: #10d5c2;
  --accent-secondary: #ff6b6b;
  --shadow-glow: 0 0 40px rgba(16, 213, 194, 0.4);
  --gradient-primary: linear-gradient(135deg, rgba(16, 213, 194, 0.2) 0%, rgba(255, 107, 107, 0.2) 100%);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Poppins', sans-serif;
  background: var(--primary-bg);
  color: var(--text-primary);
  transition: all 0.3s ease;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(16, 213, 194, 0.1) 0%, transparent 50%);
  z-index: -1;
  animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
  border-top-color: var(--accent-secondary);
  animation-delay: -0.5s;
  transform: scale(0.8);
}

.spinner-ring:nth-child(3) {
  border-top-color: var(--accent-primary);
  animation-delay: -1s;
  transform: scale(0.6);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 2rem;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Glass Morphism Effects */
.glass-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glow);
  transition: all 0.3s ease;
}

.glass-button {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-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;
}

.glass-button:hover::before {
  left: 100%;
}

.glass-button:hover {
  background: var(--glass-bg);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.glass-dropdown {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--shadow-glow);
  padding: 0.5rem 0;
}

.glass-dropdown .dropdown-item {
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 0.5rem;
}

.glass-dropdown .dropdown-item:hover {
  background: var(--gradient-primary);
  color: var(--text-primary);
  transform: translateX(5px);
}

/* Navigation */
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
}

.glow-text {
  color: var(--text-primary);
  text-shadow: 0 0 20px var(--accent-primary);
  transition: all 0.3s ease;
}

.glow-text:hover {
  color: var(--accent-primary);
  text-shadow: 0 0 30px var(--accent-primary);
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary) !important;
  background: var(--gradient-primary);
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link.active::after {
  width: 80%;
}

/* Main Content */
.main-content {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
  padding: 2rem 0;
}

/* Hero Section */
.hero-carousel {
  height: 70vh;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  margin-bottom: 3rem;
}

.carousel-item {
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.carousel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.5), rgba(0, 212, 255, 0.2));
}

.carousel-caption {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 2rem;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  text-align: left;
}

.carousel-caption h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.carousel-caption p {
  font-size: 1.2rem;
  margin-bottom: 0;
  opacity: 0.9;
}

/* Glass Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
}

.glass-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-glow);
}

.glass-card h3 {
  color: var(--accent-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

/* News Cards */
.news-card {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover img {
  transform: scale(1.05);
}

.news-card-body {
  padding: 1.5rem;
}

.news-card h5 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Footer Styles */
.glass-footer {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  margin-top: 4rem;
  padding: 3rem 0 1rem;
  position: relative;
  overflow: hidden;
}

.footer-section {
  height: 100%;
}

.footer-title {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px var(--accent-primary);
}

.footer-subtitle {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.social-link:hover {
  background: var(--gradient-primary);
  color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent-primary);
  transform: translateX(5px);
  text-shadow: 0 0 10px var(--accent-primary);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-secondary);
}

.contact-item i {
  color: var(--accent-primary);
  font-size: 1.1rem;
  margin-top: 0.1rem;
  min-width: 20px;
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.copyright {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9rem;
}

.footer-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-primary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.badge-item i {
  color: var(--accent-primary);
}

/* Footer Background Elements */
.footer-bg-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.floating-element {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.floating-1 {
  width: 100px;
  height: 100px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.floating-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.floating-3 {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 70%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* Floating Action Buttons */
.floating-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s ease;
}

.fab:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Theme Modal */
.theme-modal {
  position: fixed;
  bottom: 120px;
  right: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 1rem;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.theme-modal.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.theme-option:hover {
  background: var(--gradient-primary);
  transform: translateX(5px);
}

.theme-preview {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
}

.dark-preview {
  background: linear-gradient(45deg, #00d4ff, #ffd700);
}

.light-preview {
  background: linear-gradient(45deg, #3498db, #f39c12);
}

.elegant-preview {
  background: linear-gradient(45deg, #10d5c2, #ff6b6b);
}

/* Page Transitions */
.page-content {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s ease;
}

.page-content.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .carousel-caption {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 1.5rem;
  }
  
  .carousel-caption h2 {
    font-size: 1.8rem;
  }
  
  .carousel-caption p {
    font-size: 1rem;
  }
  
  .glass-card {
    padding: 1.5rem;
  }
  
  .floating-buttons {
    bottom: 1rem;
    right: 1rem;
  }
  
  .theme-modal {
    right: 1rem;
    bottom: 80px;
  }

  .footer-badges {
    justify-content: flex-start;
    margin-top: 1rem;
  }

  .social-links {
    justify-content: center;
  }

  .contact-info {
    text-align: center;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 1rem 0;
  }
  
  .hero-carousel {
    height: 50vh;
    margin-bottom: 2rem;
  }
  
  .carousel-caption {
    padding: 1rem;
  }
  
  .carousel-caption h2 {
    font-size: 1.5rem;
  }
  
  .glass-card {
    padding: 1rem;
  }

  .glass-footer {
    padding: 2rem 0 1rem;
  }

  .footer-badges {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Utility Classes */
.text-glow {
  text-shadow: 0 0 20px var(--accent-primary);
}

.bg-gradient {
  background: var(--gradient-primary);
}

.border-glow {
  border: 1px solid var(--accent-primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* Form Styles */
.glass-input {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.glass-input:focus {
    background: var(--glass-bg);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    color: var(--text-primary);
    outline: none;
}

.glass-input::placeholder {
    color: var(--text-secondary);
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-select.glass-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2300d4ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
}

.form-check-input {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
/* Form Validation Styles */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* List Group Styles */
.list-group-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: var(--gradient-primary);
    transform: translateX(5px);
}

/* Achievement Items */
.achievement-item {
    padding: 1rem;
    border-left: 3px solid var(--accent-primary);
    background: var(--glass-bg);
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
}

/* Modal Styling */
.themed-modal {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
}

.themed-modal .modal-header {
    background: var(--gradient-primary);
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
}

.themed-modal .modal-title {
    color: var(--text-primary);
    font-weight: 600;
}

.themed-modal .btn-close-white {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.themed-modal .btn-close-white:hover {
    opacity: 1;
}

.themed-modal .modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.themed-modal .modal-footer {
    padding: 1rem 1.5rem;
    border-radius: 0 0 20px 20px;
}

/* Scrollbar untuk modal body */
.themed-modal .modal-body::-webkit-scrollbar {
    width: 6px;
}

.themed-modal .modal-body::-webkit-scrollbar-track {
    background: var(--secondary-bg);
    border-radius: 10px;
}

.themed-modal .modal-body::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}

.themed-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Animation untuk Read More button */
.read-more-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    transform: translateX(5px);
    text-shadow: 0 0 10px var(--accent-primary);
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(3px);
}

/* Modal backdrop enhancement */
.modal-backdrop.show {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Responsive modal */
@media (max-width: 768px) {
    .themed-modal .modal-body {
        padding: 1.5rem;
        max-height: 50vh;
    }
    
    .sambutan-photo-modal {
        max-height: 200px;
    }
}
