/* Custom CSS for MISSHARE Website */

/* Hide page content until authentication is verified */
body {
    opacity: 0;
    background-color: #8b1538;
    transition: opacity 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

body.page-ready {
    opacity: 1;
    background-color: transparent;
}

/* Hide profile content initially to prevent flash */
.profile-content {
    display: none;
}

/* Show profile content when ready */
.profile-content.ready {
    display: block;
}

/* Hide search results initially to prevent flash */
.search-results {
    display: none;
}

/* Show search results when ready */
.search-results.ready {
    display: block;
}

/* Hide year badge initially to prevent flash - only on note viewing page */
.note-content #noteYear {
    display: none;
}

/* Root Variables */
:root {
  --primary-color: #8b1538;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --info-color: #0dcaf0;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gradient-primary: linear-gradient(135deg, #8b1538 0%, #5d0f26 100%);
  --gradient-secondary: linear-gradient(135deg, #8b1538 0%, #c41e3a 100%);
  --gradient-hero: linear-gradient(135deg, #1a365d 0%, #2d5a87 50%, #4a90a4 100%);
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Global Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  scroll-behavior: smooth;
}

/* Navigation Styles */
.navbar {
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  background-color: rgba(139, 21, 56, 0.95) !important;
  z-index: 1030;
}

.navbar-brand {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  background-color: var(--warning-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  background: #000000;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,1000 1000,0 1000,1000"/></svg>');
  background-size: cover;
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-image {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Feature Cards */
.feature-card {
  transition: all 0.3s ease;
  border-radius: 15px;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-secondary);
  border-radius: 50%;
  font-size: 2rem;
  color: white;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

/* About Section */
.about-image {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Contact Form */
.form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  padding: 12px 16px;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(196, 30, 58, 0.25);
}

.btn {
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
  border: none;
  color: white;
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

/* Social Links */
.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  color: white !important;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    text-align: center;
  }
  
  .display-4 {
    font-size: 2.5rem;
  }
  
  .display-5 {
    font-size: 2rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .feature-card {
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .lead {
    font-size: 1rem;
  }
  
  .d-flex.gap-3 {
    flex-direction: column;
    gap: 1rem !important;
  }
  
  .btn {
    width: 100%;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-to-top:hover {
  background: var(--dark-color);
  transform: translateY(-3px);
}

.scroll-to-top.show {
  display: flex;
}

/* Utility Classes */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-custom {
  box-shadow: var(--shadow-lg);
}

.border-radius-custom {
  border-radius: 15px;
}

/* Reset Password Overlay */
.reset-password-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.reset-password-content {
  background: white;
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.reset-password-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 0 1.5rem;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 1rem;
}

.reset-password-title {
  margin: 0;
  color: var(--primary-color);
  font-weight: 600;
}

.reset-password-header .btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.reset-password-header .btn-close:hover {
  background-color: #f8f9fa;
  color: var(--danger-color);
}

.reset-password-body {
  padding: 0 1.5rem;
}

.reset-password-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid #e9ecef;
  margin-top: 1rem;
}

/* Responsive adjustments for overlay */
@media (max-width: 576px) {
  .reset-password-overlay {
    padding: 10px;
  }
  
  .reset-password-content {
    max-height: 95vh;
  }
  
  .reset-password-header,
  .reset-password-body,
  .reset-password-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .reset-password-footer {
    flex-direction: column;
  }
  
  .reset-password-footer .btn {
    width: 100%;
  }
}

/* Modal Styles */
.modal {
  z-index: 1055 !important;
}

.modal-backdrop {
  z-index: 1050 !important;
}

/* Print Styles */
@media print {
  .navbar,
  .scroll-to-top,
  .btn,
  .reset-password-overlay {
    display: none !important;
  }
  
  .hero-section {
    background: none !important;
    color: black !important;
  }
  
  .text-white {
    color: black !important;
  }
}
