/* static/css/base_styles.css */

/* Variables */
:root {
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --sidebar-bg: #0078FF;
    --sidebar-hover: #0066DD;
    --sidebar-active: #4c63ef;
    --transition-speed: 0.3s;
    --gold-color: #ffd700;
    --text-light: #ffffff;
    --text-dark: #333333;
  }
  
  /* Reset & Global */
  html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    height: 100%;
  }
  body {
    display: flex;
    flex-direction: row;
    background-color: #f8f9fa;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
  }
  body:not(.authenticated) {
    display: block;
  }
  
  /* Sidebar Styling */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--text-light);
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
  }
  body:not(.authenticated) .sidebar {
    display: none !important;
  }
  .sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
  }
  .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    height: 80px;
  }
  .sidebar-brand a {
    color: var(--gold-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 24px;
    white-space: nowrap;
  }
  .toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 20px;
    cursor: pointer;
    transition: transform var(--transition-speed);
  }
  .sidebar.collapsed .toggle-btn {
    transform: rotate(180deg);
  }
  .user-profile {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
  }
  .sidebar.collapsed .user-profile {
    justify-content: center;
    padding: 25px 10px;
  }
  .user-avatar {
    width: 50px;
    height: 50px;
    background-color: var(--sidebar-active);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
  }
  .user-details {
    overflow: hidden;
    transition: opacity var(--transition-speed);
    white-space: nowrap;
  }
  .sidebar.collapsed .user-details {
    opacity: 0;
    width: 0;
    height: 0;
  }
  .username {
    font-weight: 600;
    margin-bottom: 5px;
  }
  .email {
    opacity: 0.8;
    font-size: 13px;
    color: black;
  }
  .sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .nav-item {
    width: 100%;
    margin-bottom: 5px;
  }
  .nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    border-radius: 0 30px 30px 0;
    margin-right: 15px;
  }
  .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: var(--gold-color);
  }
  .nav-link.active {
    color: var(--gold-color);
  }
  .nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--gold-color);
  }
  .sidebar.collapsed .nav-link {
    padding: 15px 0;
    justify-content: center;
    margin-right: 0;
    border-radius: 0;
  }
  .nav-icon {
    min-width: 40px;
    text-align: center;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-color);
  }
  .nav-text {
    transition: opacity var(--transition-speed);
    white-space: nowrap;
    font-weight: 500;
  }
  .sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    display: none;
  }
  .logout-btn {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
  }
  sup {
    position: relative;
    top: -0.5em;
    font-size: 10px;
    background-color: var(--gold-color);
    color: var(--text-dark);
    padding: 1px 5px;
    border-radius: 4px;
    margin-right: 5px;
    font-weight: bold;
  }
  .hidden-form {
    display: none;
  }
  .relative-position {
    position: relative;
  }
  
  /* Main Content Container */
  .content-wrapper {
    flex: 1;
    width: 100%;
    transition: margin-left var(--transition-speed);
    margin-left: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  body.authenticated .content-wrapper {
    margin-left: var(--sidebar-width);
  }
  body.authenticated .sidebar.collapsed ~ .content-wrapper {
    margin-left: var(--sidebar-collapsed-width);
  }
  .main-content {
    padding: 20px;
    position: relative;
    flex: 1;
  }
  
  /* Flash Messages */
  .flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    width: auto;
    z-index: 1050;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    animation: slideIn 0.4s ease-out forwards;
  }
  .flash-icon {
    margin-right: 15px;
    font-size: 20px;
  }
  @keyframes slideIn {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
  }
  
  /* Hero Section */
  .hero-section {
    height: 100vh;
    margin-top: 0;
    padding-top: 0;
    position: relative;
  }
  #hero-video {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    min-width: 100%;
    min-height: 100vh;
    object-fit: cover;
    z-index: -2;
  }
  .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
  .hero-subtitle {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 20px;
}
  .hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    color: #fff;
    padding: 0 15px;
  }
  .hero-title {
    color: var(--gold-color) !important;
    font-size: 6rem; /* Larger for desktops */
    line-height: 1.2;
    margin-bottom: 20px;
  }
  
  /* Features Section */
  .features {
    position: relative;
  }
  .feature-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
  }
  .feature-card:hover {
    transform: translateY(-5px);
  }
  .feature-icon {
    font-size: 2.5rem;
    margin-right: 15px;
    color: var(--gold-color);
  }
  .feature-text h3 {
    margin-bottom: 10px;
  }
  .feature-text p {
    margin: 0;
  }
  
  /* Floating Text */
  .floating-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12rem;
    color: rgba(255, 215, 0, 0.1) !important;
    white-space: nowrap;
    pointer-events: none;
    z-index: -2;
    animation: float 10s ease-in-out infinite alternate;
  }
  @keyframes float {
    0% { transform: translate(-50%, -50%) translateY(0) rotate(0deg); }
    100% { transform: translate(-50%, -50%) translateY(-50px) rotate(5deg); }
  }
  .section-floating-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    color: rgba(255, 215, 0, 0.15) !important;
    white-space: nowrap;
    pointer-events: none;
    z-index: -1;
    animation: floatSection 10s ease-in-out infinite alternate;
  }
  @keyframes floatSection {
    0% { transform: translate(-50%, -50%) translateY(0) rotate(0deg); }
    100% { transform: translate(-50%, -50%) translateY(-20px) rotate(3deg); }
  }
  
  /* Watermark */
  body::after {
    content: "Secured by Phantom 2M";
    position: fixed;
    bottom: 20px;
    right: 20px;
    opacity: 0.15;
    font-size: 40px;
    transform: rotate(-15deg);
    z-index: 9999;
    pointer-events: none;
    color: #666;
  }
  
  /* Footer */
  footer.footer {
    background-color: #000;
    color: #fff;
    padding: 20px 0;
  }
  footer nav a {
    color: #fff !important;
  }
  body.authenticated footer {
    margin-left: 0;
    width: 100%;
    margin-top: auto;
  }
  
  /* Mobile Adjustments */
  @media (max-width: 991.98px) {
    .sidebar {
      transform: translateX(-100%);
      transition: transform 0.3s ease;
      width: 100%;
      max-width: 300px;
    }
    .sidebar.show {
      transform: translateX(0);
    }
    .sidebar.collapsed {
      transform: translateX(-100%);
    }
    body.authenticated .content-wrapper,
    body.authenticated footer {
      margin-left: 0;
      width: 100%;
    }
    .mobile-toggle {
      display: block;
      position: fixed;
      top: 15px;
      left: 15px;
      z-index: 1060;
      background-color: var(--sidebar-bg);
      color: var(--gold-color);
      border: none;
      width: 45px;
      height: 45px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    body:not(.authenticated) .mobile-toggle {
      display: none;
    }
    .sidebar.show .user-details,
    .sidebar.show .nav-text {
      opacity: 1;
      width: auto;
      height: auto;
      display: block;
    }
    .nav-item .nav-link {
      border-radius: 0;
      margin-right: 0;
    }
  }
  @media (max-width: 768px) {
    .hero-title {
        font-size: 4rem; /* Slightly smaller on mobile */
    }
    .hero-subtitle {
        font-size: 1.2rem;
        padding: 0 10px;
        text-align: center;
    }
}

/* Hero Title and Subtitle Animations */
.hero-title {
  animation: slideInRight 1s ease-out forwards;
  opacity: 0; /* Start hidden before animation */
}

.hero-subtitle {
  animation: slideUp 1s ease-out 0.5s forwards; /* 0.5s delay for staggered effect */
  opacity: 0; /* Start hidden before animation */
}

/* Keyframes for sliding in from the right */
@keyframes slideInRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Keyframes for sliding up */
@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Adjust animations for smaller screens */
@media (max-width: 768px) {
  @keyframes slideInRight {
    from {
      transform: translateX(20px);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  @keyframes slideUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

