/* Index Page Styles */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Light Mode Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --white-belt: #ffffff;
    --yellow-belt: #fbbf24;
    --orange-belt: #f97316;
    --green-belt: #22c55e;
    --blue-belt: #3b82f6;
    --brown-belt: #a3a3a3;
    --black-belt: #1f2937;
    --gold-belt: #eab308;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --shadow-soft: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-strong: 0 8px 32px rgba(0,0,0,0.15);
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-gradient: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    --border-radius-lg: 16px;
    --container-max-width: 1200px;
    
    /* Theme Variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-300: #64748b;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f1f5f9;
    --gray-800: #f8fafc;
    --gray-900: #ffffff;
    
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #404040;
    --card-bg: #2d2d2d;
    --input-bg: #2d2d2d;
    
    --shadow-soft: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-strong: 0 8px 32px rgba(0,0,0,0.4);
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-height: 100vh;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Search Section */
.search-section {
    background: var(--card-bg);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.search-header {
    text-align: center;
    margin-bottom: 40px;
}

.search-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.search-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-input-group {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3.5rem 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--input-bg);
    color: var(--text-primary);
    line-height: 1.5;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Filters */
.filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

/* Belt Progression */
.belt-progression {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.belt {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    color: #333;
}

.belt:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-strong);
}

.belt.white { background: var(--white-belt); }
.belt.yellow { background: var(--yellow-belt); }
.belt.orange { background: var(--orange-belt); color: white; }
.belt.green { background: var(--green-belt); color: white; }
.belt.blue { background: var(--blue-belt); color: white; }
.belt.brown { background: var(--brown-belt); color: white; }
.belt.black { background: var(--black-belt); color: white; }
.belt.gold { background: var(--gold-belt); }

.belt.active {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
}

/* Content Grid */
.content-section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-primary);
}

.sort-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sort-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.content-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border-color);
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.content-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.content-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.content-type {
    background: var(--primary-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.content-belts {
    display: flex;
    gap: 5px;
}

.mini-belt {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.content-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.content-title a {
    color: inherit;
    text-decoration: none;
}

.content-title a:hover {
    color: #667eea;
}

.content-summary {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.content-body {
    padding: 0 20px 20px;
}

.content-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid var(--border-color);
}

.tag:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.content-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.content-source {
    font-size: 12px;
    color: var(--text-secondary);
}

.content-scores {
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.score {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
}

.score i {
    color: #ffc107;
}

/* Featured Content */
.featured-content-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.2s ease;
}

.featured-content-link:hover .featured-title {
    transform: translateX(5px);
    color: rgba(255, 255, 255, 0.9);
}

.featured-content-link:hover .featured-content {
    transform: translateY(-1px);
    box-shadow: var(--shadow-xl);
}

.featured-content {
    background: var(--primary-gradient);
    color: white;
    padding: 40px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.featured-content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.featured-badge {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: inline-block;
}

.featured-title {
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.featured-summary {
    font-size: 1.2em;
    opacity: 0.9;
    margin-bottom: 25px;
    line-height: 1.5;
}

.featured-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.page-btn {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.page-btn:hover, .page-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .search-title {
        font-size: 2em;
    }
    
    .filters {
        flex-direction: column;
        align-items: center;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-title {
        font-size: 2em;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Loading States */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.loading i {
    font-size: 2em;
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.empty-state i {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--text-primary);
}