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

:root {
    --bg-color: #ffffff;
    --text-color: #1c1e21;
    --text-secondary: #65676b;
    --card-bg: #ffffff;
    --nav-bg: #4267b2;
    --nav-text: #ffffff;
    --search-bg: #f0f2f5;
    --search-text: #1c1e21;
    --border-color: #dadde1;
    --shadow: rgba(0, 0, 0, 0.12);
    --accent-primary: #1877f2;
    --accent-secondary: #42b883;
    --accent-danger: #e41e3f;
    --hover-bg: #f0f2f5;
}

[data-theme="dark"] {
    --bg-color: #18191a;
    --text-color: #e4e6ea;
    --text-secondary: #b0b3b8;
    --card-bg: #242526;
    --nav-bg: #242526;
    --nav-text: #e4e6ea;
    --search-bg: #3a3b3c;
    --search-text: #e4e6ea;
    --border-color: #3e4042;
    --shadow: rgba(0, 0, 0, 0.3);
    --accent-primary: #2d88ff;
    --accent-secondary: #42b883;
    --accent-danger: #f02849;
    --hover-bg: #3a3b3c;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar {
    background: var(--nav-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px var(--shadow);
}

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

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    background: #34495e;
    color: #ecf0f1;
    width: 300px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #bdc3c7;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-clear:hover {
    color: #ecf0f1;
}

.search-clear.show {
    display: flex;
}

.theme-toggle {
    background: none;
    border: none;
    color: #ecf0f1;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background: #34495e;
}

.search-bar:focus {
    background: #ecf0f1;
    color: #2c3e50;
    width: 350px;
}

.search-bar::placeholder {
    color: #bdc3c7;
}

.search-bar:focus::placeholder {
    color: #7f8c8d;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result:hover {
    background: var(--bg-color);
}

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

.search-result h4 {
    color: var(--text-color);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.search-result p {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.85rem;
    margin: 0;
}

.search-result .category {
    color: var(--accent-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
}

.no-results {
    padding: 1rem;
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    font-style: italic;
}

.nav-brand h1 {
    color: #ecf0f1;
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #bdc3c7;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background: #34495e;
    color: #ecf0f1;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
}

.lists-container {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.list-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.list-image {
    width: 100%;
    height: 200px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.1rem;
}

.list-content {
    padding: 1.5rem;
}

.list-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.list-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
}

.category-tag {
    background: #3498db;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

footer {
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.list-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.article-intro {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.8;
}

.list-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.list-item {
    display: flex;
    gap: 1.5rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.item-number {
    font-size: 3rem;
    font-weight: bold;
    color: #3498db;
    min-width: 60px;
}

.item-content {
    flex: 1;
}

.item-content h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.item-image {
    width: 100%;
    height: 200px;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin: 1rem 0;
    border-radius: 4px;
}

.item-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.item-link {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.item-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .list-grid {
        grid-template-columns: 1fr;
    }
    
    .list-item {
        flex-direction: column;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    gap: 0.5rem;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.cookie-btn.accept {
    background: #27ae60;
    color: white;
}

.cookie-btn.accept:hover {
    background: #229954;
}

.cookie-btn.settings {
    background: #34495e;
    color: white;
}

.cookie-btn.settings:hover {
    background: #2c3e50;
}

.cookie-btn.decline {
    background: #e74c3c;
    color: white;
}

.cookie-btn.decline:hover {
    background: #c0392b;
}

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-modal h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cookie-category h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: #3498db;
}

input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

.cookie-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-left {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .search-bar:focus {
        width: 100%;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .list-grid {
        grid-template-columns: 1fr;
    }
    
    .list-item {
        flex-direction: column;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .cookie-modal-content {
        padding: 1rem;
    }
}
