/* Reset és alapok */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 700;
    font-size: 24px;
}

.logo-icon {
    font-size: 32px;
}

.main-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--primary);
    color: white !important;
    padding: 8px 16px;
    border-radius: 8px;
}

.user-menu {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--gray-700);
}

.username {
    font-weight: 600;
}

.reputation {
    font-size: 12px;
    color: var(--gray-500);
}

.admin-link {
    background: var(--warning);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.logout-link {
    color: var(--danger);
    text-decoration: none;
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-primary {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 18px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 48px;
    margin-bottom: 16px;
    font-weight: 800;
}

.hero-section p {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.95;
}

.hero-section .btn {
    margin: 0 8px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 0;
}

/* Categories Grid */
.categories-section {
    margin-bottom: 60px;
}

.categories-section h2 {
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--gray-900);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    padding: 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.category-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.category-card p {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 16px;
    min-height: 40px;
}

.category-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--gray-500);
}

/* Questions Section */
.questions-section h2 {
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--gray-900);
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-item {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
    transition: all 0.2s;
}

.question-item:hover {
    box-shadow: var(--shadow-lg);
}

.question-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 100px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    background: var(--gray-50);
}

.stat.has-answers {
    background: var(--secondary);
    color: white;
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
}

.stat-label {
    font-size: 11px;
    color: var(--gray-500);
}

.stat.has-answers .stat-label {
    color: white;
}

.question-content {
    flex: 1;
}

.question-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.question-content h3 a {
    color: var(--gray-900);
    text-decoration: none;
    transition: color 0.2s;
}

.question-content h3 a:hover {
    color: var(--primary);
}

.question-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--gray-500);
}

.category a {
    color: var(--primary);
    text-decoration: none;
}

.author strong {
    color: var(--gray-700);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--border-radius);
    color: var(--gray-500);
}

/* Footer */
.main-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h4 {
    color: white;
    margin-bottom: 16px;
    font-size: 16px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 20px;
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu {
    display: none;
    background: white;
    box-shadow: var(--shadow-lg);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
}

.mobile-menu a {
    padding: 16px 20px;
    text-decoration: none;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 1200px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 32px;
    }
    
    .hero-section p {
        font-size: 16px;
    }
    
    .main-nav {
        display: none;
    }
    
    .user-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .question-item {
        flex-direction: column;
    }
    
    .question-stats {
        flex-direction: row;
        justify-content: space-around;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}