body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    color: #1f2937;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glass Card Style */
.glass-card {
  width: 100%;
  max-width: 600px;
  min-height: 200px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 14px 7px rgba(255, 255, 255, 0.7);
  position: relative;
  overflow: hidden;
  padding: 2rem;
  margin-bottom: 2rem;
}

/* Shinning Effects */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
}

.glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.8),
    transparent,
    rgba(255, 255, 255, 0.3)
  );
}

/* Sidebar Styles */

/* --- GLASS SIDEBAR CONTAINER --- */
.glass-sidebar {
    height: 100vh;
    width: 280px;
    position: fixed;
    top: 0;
    left: -320px; /* Fully hidden by default */
    z-index: 5000; /* Ensure it floats above everything */
    
    /* Glass Effect */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    
    /* Layout & Animation */
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth 'ease-out' slide */
}

/* Active State (Shown) */
.glass-sidebar.active {
    left: 0;
}

/* --- SIDEBAR HEADER --- */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(31, 41, 55, 0.1);
}

.sidebar-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    color: #ef4444; /* Red on hover */
    transform: rotate(90deg);
}

/* --- NAVIGATION LINKS --- */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1; /* Pushes footer to bottom */
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.9rem 1rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.sidebar-nav a i {
    width: 35px; /* Fixed width for icon alignment */
    font-size: 1.2rem;
    color: #2563eb; /* Primary Blue */
    transition: transform 0.2s ease;
}

/* Hover Effects */
.sidebar-nav a:hover {
    background: rgba(37, 99, 235, 0.1); /* Light Blue Tint */
    color: #1e40af;
    transform: translateX(5px);
}

.sidebar-nav a:hover i {
    transform: scale(1.1);
}

/* --- SIDEBAR FOOTER & USER PROFILE --- */
.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(31, 41, 55, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0.75rem;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.avatar-circle {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

/* Make spans look clickable since they are Login/Sign Up */
.user-info span {
    transition: color 0.2s;
}

.user-info span:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* --- OVERLAY (Dark Background) --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Dimmed background */
    backdrop-filter: blur(4px); /* Blur the content behind */
    z-index: 4999; /* Just behind the sidebar */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Form Elements Styling to match Glass Theme */
h1, h2, h3 {
    color: #111827;
    margin-top: 0;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

select, input, button {
    width: 100%;
    padding: 18px;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

select:focus, input:focus {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

button {
    background: #2563eb;
    color: white;
    font-weight: bold;
    cursor: pointer;
    border: none;
}

button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.form-button {
    background: linear-gradient(to right, #2563eb, #7c3aed);
    color: white;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    margin: 3px auto;
    padding: 15px;
}

.form-button:hover {
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

/* Grid for Results Page */
.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 1000px;
}

@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr 1fr;
    }
}