/* hide search on login page if you give <body> a class, e.g., <body class="login"> */
body.login .search-container {
  display: none !important;
}
.course-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    text-align: center;
}
/* Abstraction Academy Styles */
:root {
    --primary-white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #e9ecef;
    --highlight-blue: #007bff;
    --text-dark: #343a40;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --success-green: #28a745;
    --error-red: #dc3545;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Montserrat', 'Segoe UI', 'Roboto', Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Navigation Bar */
.navbar {
    background-color: var(--primary-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--highlight-blue);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--highlight-blue);
    border-radius: var(--radius);
    /* REPLACE LOGO HERE - add background-image or replace with <img> */
}

.search-container {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar:focus {
    border-color: var(--highlight-blue);
}

.search-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: var(--shadow);
    display: none;
}

.profile-container {
    position: relative;
}

.profile-circle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--highlight-blue);
    color: white;
    border-radius: var(--radius);
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.4s cubic-bezier(0.4,0,0.2,1), color 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 2px 8px rgba(0,123,255,0.08);
}

.profile-circle:hover {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,123,255,0.18);
    filter: brightness(1.08);
    animation: fadeBtn 0.4s;
}

@keyframes fadeBtn {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--primary-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 200px;
    margin-top: 0.5rem;
    display: none;
    z-index: 1001;
}

.profile-dropdown.show {
    display: block;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* Back arrow link reused on lesson pages */
.back-arrow{
    display:inline-flex;
    align-items:center;
    gap:0.45rem;
    padding:6px 10px;
    border-radius:8px;
    text-decoration:none;
    color:inherit;
    font-weight:600;
    border:1px solid rgba(0,0,0,0.06);
    background:transparent;
}
.back-arrow:hover{background:rgba(0,0,0,0.03)}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Home Page */
.page {
    display: none;
}

.page.active {
    display: block;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.course-card {
    background: var(--primary-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.course-thumbnail {
    width: 100%;
    height: 180px;
    background-color: var(--dark-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-light);
    border-radius: 12px 12px 0 0;
    /* REPLACE THUMBNAIL HERE - add background-image or replace with <img> */
}

.course-info {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Sign In Page */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--primary-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.auth-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--highlight-blue);
}

.btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--highlight-blue);
    color: var(--primary-white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    outline: none;
}

.btn:hover {
    background-color: #0056b3;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.btn-google {
    background-color: var(--primary-white);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-google:hover {
    background-color: var(--light-gray);
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: var(--text-light);
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
    z-index: 1;
}

.divider span {
    background-color: var(--primary-white);
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.error-message {
    color: var(--error-red);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.success-message {
    color: var(--success-green);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.verification-code {
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
    font-family: monospace;
    font-size: 1.25rem;
    margin: 1rem 0;
}

/* Course Page */
.course-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.video-container {
    background: var(--primary-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-white);
    font-size: 1.5rem;
    /* REPLACE VIDEO HERE - add <video> element or embed */
}

.course-sidebar {
    background: var(--primary-white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    max-height: 80vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.content-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-item:hover {
    background-color: var(--light-gray);
}

.content-item.active {
    background-color: rgba(0, 123, 255, 0.1);
    border-left: 4px solid var(--highlight-blue);
}

.content-item.completed {
    color: var(--text-light);
}

.content-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.checkmark {
    color: var(--success-green);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .search-container {
        margin: 0 1rem;
        max-width: none;
    }

    .main-content {
        padding: 0 1rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .course-layout {
        grid-template-columns: 1fr;
    }

    .course-sidebar {
        order: -1;
        max-height: 300px;
    }
}

/* Accessibility */
.btn:focus,
.course-card:focus,
.content-item:focus {
    outline: 2px solid var(--highlight-blue);
    outline-offset: 2px;
}

/* Hide elements when not needed */
.hidden {
    display: none !important;
}

.big-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    font-size: 1.5rem;
    background: var(--primary-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 2px solid var(--highlight-blue);
    color: var(--highlight-blue);
    font-weight: bold;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.big-box:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.big-box .top-half,
.big-box .bottom-half {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.big-box .divider-horizontal {
    height: 2px;
    flex: none;
    width: 100%;
    background-color: var(--border-color);
}

/* remove underline on all .big-box link states and their contents */
a.big-box {
  text-decoration: none !important;
  color: inherit; /* keep text color from parent instead of default link blue */
}

a.big-box:hover,
a.big-box:focus,
a.big-box:active,
a.big-box:visited {
  text-decoration: none !important;
}

/* ensure no child element reintroduces an underline */
a.big-box,
a.big-box * {
  text-decoration: none !important;
}
/* force title + description to stack vertically */
.bottom-half {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0.5rem 0;
}

/* title styling */
.course-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

/* description styling */
.course-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-light);
}
/* Polished video-style course card */
.course-card-polished {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--primary-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  max-width: 320px;
}

/* Lift on hover */
.course-card-polished:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.15);
}

/* Thumbnail area */
.thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Actual image */
.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder if no image */
.thumbnail-placeholder {
  font-size: 2rem;
  color: var(--text-light);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-gray);
}

/* Dark gradient overlay for readability + icons */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px;
  pointer-events: none;
}

/* Play icon (can be replaced with SVG) */
.play-icon {
  font-size: 1.25rem;
  color: #fff;
  background: rgba(0,0,0,0.4);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: bold;
}

/* Duration badge */
.duration-badge {
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.65rem;
  padding: 4px 8px;
  border-radius: 12px;
}

/* Title + description area */
.bottom-half {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  gap: 4px;
}

/* Title */
.course-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

/* Description */
.course-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.3;
}
