:root {
    /* LeetCode Color Palette */
    --bg-primary: #1a1a1a;
    --bg-secondary: #262626;
    --bg-tertiary: #303030;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-accent: #ffa116;
    --leetcode-easy: #00b8a3;
    --leetcode-medium: #ffc01e;
    --leetcode-hard: #ef4743;
    --border-color: #3a3a3a;
    --hover-color: #404040;
    --gradient-primary: linear-gradient(135deg, #ffa116 0%, #ffb84d 100%);
    --gradient-secondary: linear-gradient(135deg, #262626 0%, #303030 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.7);
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px; /* Account for fixed header */
}

body.homepage {
    padding-top: 0; /* Homepage hero starts from top */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.accent {
    color: var(--text-accent);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-accent);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-accent);
}

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

.search-container {
    position: relative;
    margin: 0 1rem;
}

.search-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    width: 220px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.search-container::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.875rem;
    z-index: 1;
    pointer-events: none;
}

.search-input:focus {
    outline: none;
    border-color: var(--text-accent);
    width: 280px;
    box-shadow: 0 4px 16px rgba(255, 161, 22, 0.15), 0 0 0 2px rgba(255, 161, 22, 0.2);
    background: var(--bg-secondary);
}

.search-input:focus + .search-container::before {
    color: var(--text-accent);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.search-results::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--border-color);
}

.search-results::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 21px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--bg-secondary);
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.search-result-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--text-accent);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.search-result-item:hover,
.search-result-item.active {
    background: var(--bg-primary);
    transform: translateX(2px);
}

.search-result-item:hover::before,
.search-result-item.active::before {
    transform: scaleY(1);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.search-result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.search-result-number {
    background: var(--text-accent);
    color: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.75rem;
    min-width: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.search-result-title {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    transition: var(--transition);
}

.search-result-item:hover .search-result-title {
    color: var(--text-accent);
}

.search-result-difficulty {
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-difficulty.easy {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.search-result-difficulty.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.search-result-difficulty.hard {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.search-result-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-result-tags .tag {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 0.125rem 0.375rem;
    border-radius: var(--border-radius);
    font-size: 0.7rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.search-result-item:hover .search-result-tags .tag {
    border-color: var(--text-accent);
    color: var(--text-primary);
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.search-no-results p {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.search-no-results small {
    opacity: 0.7;
    font-size: 0.875rem;
    display: block;
    margin-top: 0.5rem;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    background: var(--gradient-secondary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 40%;
    height: 200%;
    background: linear-gradient(135deg, #ffa116 0%, #ffb84d 50%, #ffa116 100%);
    transform: rotate(15deg);
    opacity: 0.03;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    justify-content: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-accent);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #1a1a1a;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #ffb84d 0%, #ffa116 100%);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-accent);
}

.btn-outline {
    background: transparent;
    color: var(--text-accent);
    border: 1px solid var(--text-accent);
}

.btn-outline:hover {
    background: var(--text-accent);
    color: var(--bg-primary);
}

/* Ad Container */
.ad-container {
    padding: 2rem 0;
    display: flex;
    justify-content: center;
}

.ad-placeholder {
    width: 728px;
    height: 90px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ad-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Problems Section */
.problems-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.problem-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.problem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.problem-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--text-accent);
}

.problem-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.problem-number {
    background: var(--text-accent);
    color: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 24px;
    box-shadow: var(--shadow-sm);
}

.problem-difficulty {
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.problem-difficulty.easy {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.problem-difficulty.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.problem-difficulty.hard {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.problem-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.problem-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.problem-title a:hover {
    color: var(--text-accent);
}

.problem-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.problem-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.problem-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
}

.tag-more {
    background: var(--text-accent);
    color: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
}

.problem-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.problem-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* About Section */
.about-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 161, 22, 0.02) 50%, transparent 100%);
    transform: rotate(-15deg);
    z-index: 1;
}

.about-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.about-intro {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 400;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--text-accent);
}

.about-card:hover::before {
    transform: scaleX(1);
}

.about-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    filter: grayscale(0.2);
    transition: var(--transition);
}

.about-card:hover .about-card-icon {
    transform: scale(1.1);
    filter: grayscale(0);
}

.about-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.about-card:hover h3 {
    color: var(--text-accent);
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-brand h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.footer-links h4,
.footer-social h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--text-accent);
    border-radius: 1px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding-left: 0;
    border-radius: var(--border-radius-sm);
    padding: 0.25rem 0;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: var(--transition);
    color: var(--text-accent);
}

.footer-links a:hover {
    color: var(--text-accent);
    padding-left: 15px;
}

.footer-links a:hover::before {
    opacity: 1;
    left: 0;
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    border-radius: var(--border-radius-sm);
}

.social-link::before {
    content: '🔗';
    font-size: 0.875rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--text-accent);
    transform: translateX(4px);
}

.social-link:hover::before {
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    position: relative;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: var(--text-accent);
}

/* Loading States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--text-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Fix empty state alignment in problems grid */
.problems-grid .empty-state {
    grid-column: 1 / -1; /* Span all columns */
    text-align: center;
    margin: 2rem auto;
    max-width: 500px;
}

/* Table Styles for All Problems Page */
.problems-table {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.table-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    display: grid;
    grid-template-columns: 80px 1fr 120px 200px 120px;
    gap: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.table-row {
    padding: 1rem;
    display: grid;
    grid-template-columns: 80px 1fr 120px 200px 120px;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    align-items: center;
}

.table-row:hover {
    background: var(--bg-primary);
}

.table-row:last-child {
    border-bottom: none;
}

.sort-button {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.sort-button:hover {
    color: var(--text-accent);
}

.sort-button::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    opacity: 0.5;
}

.sort-button.sort-asc::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid currentColor;
}

.sort-button.sort-desc::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid currentColor;
}

/* Filters */
.filters-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filters-container {
    display: flex;
    gap: 1.5rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.filter-group select,
.filter-group input {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    min-width: 150px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--text-accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.stat-card .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-accent);
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 1rem;
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin: 0 0.5rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-accent);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
    color: var(--text-secondary);
}

/* SEO and Performance Optimizations */    /* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        z-index: 1000;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .youtube-link {
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .problems-grid {
        grid-template-columns: 1fr;
    }
    
    .ad-placeholder {
        width: 320px;
        height: 50px;
    }
    
    .solution-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
    }
    
    .problem-detail-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Search Bar Responsive */
    .search-container {
        margin: 0 0.5rem;
    }
    
    .search-input {
        width: 180px;
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem 0.6rem 2.2rem;
    }
    
    .search-container::before {
        left: 0.6rem;
        font-size: 0.8rem;
    }
    
    .search-input:focus {
        width: 220px;
    }
    
    .search-results {
        max-height: 300px;
        font-size: 0.875rem;
        margin-top: 0.25rem;
    }
    
    .search-results::before,
    .search-results::after {
        display: none;
    }
    
    .search-result-item {
        padding: 0.75rem;
    }
    
    .search-result-header {
        gap: 0.5rem;
        margin-bottom: 0.4rem;
    }
    
    .search-result-number {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        min-width: 1.8rem;
    }
    
    .search-result-title {
        font-size: 0.9rem;
    }
    
    .search-result-difficulty {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .search-result-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .search-result-tags .tag {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
    }
    
    /* About Section Responsive */
    .about-section {
        padding: 3rem 0;
    }
    
    .about-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .about-card {
        padding: 1.5rem;
    }
    
    .about-card-icon {
        font-size: 2.5rem;
    }
    
    .about-intro {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }
    
    /* Footer Responsive */
    .footer {
        padding: 2rem 0 1rem;
        margin-top: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-links h4::after,
    .footer-social h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links a::before {
        display: none;
    }
    
    .footer-links a:hover {
        padding-left: 0;
        transform: translateY(-1px);
    }
    
    .footer-links,
    .footer-social {
        gap: 0.5rem;
    }
    
    .footer-bottom {
        padding-top: 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .problem-card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Very Small Screen Adjustments */
    .search-input {
        width: 140px;
        padding: 0.5rem 0.7rem 0.5rem 2rem;
        font-size: 0.75rem;
    }
    
    .search-container::before {
        left: 0.5rem;
        font-size: 0.75rem;
    }
    
    .search-input:focus {
        width: 180px;
    }
    
    .search-container {
        margin: 0 0.25rem;
    }
    
    .search-results {
        max-height: 250px;
        font-size: 0.8rem;
    }
    
    .search-result-item {
        padding: 0.6rem;
    }
    
    .search-result-header {
        gap: 0.4rem;
        margin-bottom: 0.3rem;
        flex-wrap: wrap;
    }
    
    .search-result-number {
        font-size: 0.65rem;
        padding: 0.15rem 0.35rem;
        min-width: 1.6rem;
    }
    
    .search-result-title {
        font-size: 0.85rem;
        flex: 1;
        min-width: 100px;
    }
    
    .search-result-difficulty {
        font-size: 0.65rem;
        padding: 0.15rem 0.35rem;
    }
    
    .search-result-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        margin-bottom: 0.3rem;
    }
    
    .search-result-tags {
        gap: 0.3rem;
    }
    
    .search-result-tags .tag {
        font-size: 0.6rem;
        padding: 0.08rem 0.25rem;
    }
    
    .about-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-card {
        padding: 1rem;
    }
    
    .about-card-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .about-card h3 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
    
    .about-intro {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .footer {
        padding: 1.5rem 0 0.75rem;
        margin-top: 2rem;
    }
    
    .footer-brand h3 {
        font-size: 1.25rem;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-links h4,
    .footer-social h4 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-links h4::after,
    .footer-social h4::after {
        width: 25px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links,
    .footer-social {
        gap: 0.4rem;
    }
    
    .footer-links a,
    .social-link {
        padding: 0.2rem 0;
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        padding-top: 1rem;
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }
}

/* Dark mode specific scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Selection styles */
::selection {
    background: var(--text-accent);
    color: var(--bg-primary);
}

::-moz-selection {
    background: var(--text-accent);
    color: var(--bg-primary);
}

/* Logo Styles */
.logo {
    height: 40px;
    width: auto;
    margin-right: 0.75rem;
    border-radius: var(--border-radius-sm);
}

.footer-logo {
    height: 32px;
    width: auto;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius-sm);
}

.youtube-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 0, 0, 0.2);
    transition: var(--transition);
}

.youtube-link:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
    transform: translateY(-1px);
}

.youtube-link svg {
    color: #ff0000;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}
