* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --bg: #f4f7fc;
    --text: #1a1a2e;
    --card-bg: #ffffff;
    --shadow: 0 8px 24px rgba(0,0,0,0.08);
    --primary: #2c3e50;
    --accent: #3498db;
    --radius: 16px;
    --header-bg: #ffffff;
    --footer-bg: #2c3e50;
    --footer-text: #ecf0f1;
}
[data-theme="dark"] {
    --bg: #0f0f23;
    --text: #e0e0e0;
    --card-bg: #1e1e3a;
    --shadow: 0 8px 24px rgba(0,0,0,0.5);
    --header-bg: #1a1a2e;
    --footer-bg: #0f0f23;
}
[data-theme-style="fashion"] {
    --primary: #e84393;
    --accent: #fd79a8;
}
[data-theme-style="food"] {
    --primary: #e17055;
    --accent: #fdcb6e;
}
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.header {
    background: var(--header-bg);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    flex-wrap: wrap;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}
.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.nav a:hover {
    color: var(--accent);
}
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.theme-select {
    background: var(--card-bg);
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text);
}
.btn-icon {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text);
}
.hero {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    text-align: center;
    padding: 60px 20px;
    border-radius: 0 0 var(--radius) var(--radius);
    margin-bottom: 40px;
}
.hero h1 {
    font-size: 2rem;
    margin-bottom: 16px;
    font-weight: 700;
}
.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 24px;
}
.search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto 24px;
    gap: 10px;
}
.search-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 40px;
    font-size: 1rem;
    outline: none;
}
.btn-primary {
    background: #fff;
    color: var(--primary);
    border: none;
    padding: 14px 30px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.filter-tag {
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}
.filter-tag.active, .filter-tag:hover {
    background: rgba(255,255,255,0.4);
}
.stats-bar {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: var(--text);
    opacity: 0.8;
}
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}
.card-img {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.card-body {
    padding: 20px;
}
.card-body h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}
.card-body p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 12px;
}
.card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    margin-bottom: 12px;
}
.card-category {
    background: var(--accent);
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
}
.card-actions {
    display: flex;
    gap: 12px;
}
.btn-share, .btn-like {
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.btn-share:hover, .btn-like:hover {
    background: var(--accent);
    color: white;
}
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}
.footer a {
    color: var(--accent);
    text-decoration: none;
}
.login-page, .admin-page {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.login-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 400px;
    width: 100%;
}
.login-container h2 {
    margin-bottom: 20px;
    text-align: center;
}
.login-container form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.login-container input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}
.error {
    color: #e74c3c;
    text-align: center;
}
.admin-header {
    width: 100%;
    background: var(--header-bg);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}
.admin-section {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}
.admin-section h3 {
    margin-bottom: 16px;
}
.admin-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.admin-form input {
    flex: 1 1 200px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
}
.admin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
}
.btn-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--header-bg);
        padding: 12px 0;
    }
    .nav.active {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .search-form {
        flex-direction: column;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
}