/* ========== ÐŸÐ•Ð Ð•ÐœÐ•ÐÐÐ«Ð• ========== */
:root {
    --bg-dark: #0e1623;
    --bg-card: #1a1f2f;
    --bg-hover: #252c3f;
    --text-main: #f0f3fa;
    --text-dim: #8e9aaf;
    --text-muted: #6c6c8c;
    --accent: #6c5ce7;
    --accent-hover: #5b4bc4;
    --border: #2a3145;
}

[data-theme="light"] {
    --bg-dark: #f5f7fa;
    --bg-card: #ffffff;
    --bg-hover: #e8ecf1;
    --text-main: #1a1a2e;
    --text-dim: #4a4a6a;
    --text-muted: #8a8aa8;
    --border: #e0e4e9;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
}

/* ========== ÐžÐ‘Ð•Ð Ð¢ÐšÐ Ð”Ð›Ð¯ ÐŸÐ Ð˜Ð–ÐÐ¢Ð˜Ð¯ Ð¤Ð£Ð¢Ð•Ð Ð ========== */
.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hoyolab-main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    gap: 32px;
}

/* ========== Ð¥Ð•Ð”Ð•Ð  ========== */
.main-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

/* Ð›ÐµÐ²Ð°Ñ Ñ‡Ð°ÑÑ‚ÑŒ */
.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.4rem;
    text-decoration: none;
    color: var(--text-main);
}

.logo i {
    font-size: 1.8rem;
    color: var(--accent);
}

.logo span {
    color: var(--accent);
}

/* ÐÐ°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ñ */
.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Ð’Ñ‹Ð¿Ð°Ð´Ð°ÑŽÑ‰ÐµÐµ Ð¼ÐµÐ½ÑŽ */
.dropdown {
    position: relative;
}

.dropdown-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
}

.dropdown-btn:hover {
    color: var(--accent);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 180px;
    z-index: 100;
    margin-top: 8px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text-main);
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

/* Ð¦ÐµÐ½Ñ‚Ñ€Ð°Ð»ÑŒÐ½Ñ‹Ð¹ Ð¿Ð¾Ð¸ÑÐº */
.header-center {
    flex: 1;
    max-width: 500px;
    margin: 0 24px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-hover);
    border-radius: 40px;
    padding: 6px 16px;
    border: 1px solid var(--border);
}

.search-box:focus-within {
    border-color: var(--accent);
}

.search-box i {
    color: var(--text-dim);
    margin-right: 10px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-main);
    padding: 10px 0;
    outline: none;
}

.search-btn {
    background: var(--accent);
    border: none;
    color: white;
    padding: 6px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
}

.search-btn:hover {
    background: var(--accent-hover);
}

/* ÐŸÑ€Ð°Ð²Ð°Ñ Ñ‡Ð°ÑÑ‚ÑŒ */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.3rem;
    position: relative;
    cursor: pointer;
}

.badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #f43f5e;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 20px;
}

/* ÐŸÑ€Ð¾Ñ„Ð¸Ð»ÑŒ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-hover);
    padding: 4px 12px;
    border-radius: 40px;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.username {
    font-weight: 500;
    font-size: 0.9rem;
}

.user-dropdown:hover .user-menu {
    display: block;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-main);
    text-decoration: none;
}

.user-menu a:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

/* ÐšÐ½Ð¾Ð¿ÐºÐ¸ Ð²Ñ…Ð¾Ð´Ð° */
.login-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-btn, .register-btn {
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.login-btn {
    background: var(--accent);
    color: white;
}

.login-btn:hover {
    background: var(--accent-hover);
}

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

.register-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ========== Ð›Ð•ÐÐ¢Ð Ð˜ Ð¡ÐÐ™Ð”Ð‘ÐÐ  ========== */
.feed-column {
    flex: 2.5;
}

.sidebar-column {
    flex: 1.2;
}

/* ÐšÐ°Ñ€Ñ‚Ð¾Ñ‡ÐºÐ° ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð¿Ð¾ÑÑ‚Ð° */
.create-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 20px;
}

.create-header {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.avatar-small {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: 50%;
}

.create-prompt {
    flex: 1;
    background: var(--bg-hover);
    border-radius: 40px;
    padding: 10px 16px;
    color: var(--text-dim);
}

.create-actions {
    display: flex;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

/* ÐŸÐ¾ÑÑ‚ */
.post-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-author {
    font-weight: 600;
}

.post-time {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.post-stats {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Ð’Ð¸Ð´Ð¶ÐµÑ‚Ñ‹ */
.widget {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tool-item {
    background: var(--bg-hover);
    border-radius: 16px;
    padding: 12px;
    text-align: center;
    font-size: 0.8rem;
}

.hot-topic-list {
    list-style: none;
}

.hot-topic-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

/* ========== Ð¤Ð£Ð¢Ð•Ð  ========== */
.site-footer {
    background: transparent;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    padding: 32px 24px 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 8px;
}

/* ========== ÐœÐžÐ”ÐÐ›ÐšÐ ========== */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-card {
    background: var(--bg-card);
    border-radius: 28px;
    width: 90%;
    max-width: 420px;
    padding: 32px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
}

.modal-card input {
    width: 100%;
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 28px;
    color: var(--text-main);
}

.modal-card button {
    background: var(--accent);
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
}

.register-link {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
}

.register-link a {
    color: var(--accent);
    text-decoration: none;
}

/* ========== ÐÐ”ÐÐŸÐ¢Ð˜Ð’ÐÐžÐ¡Ð¢Ð¬ ========== */
@media (max-width: 1024px) {
    .header-center {
        max-width: 300px;
        margin: 0 16px;
    }
}

@media (max-width: 768px) {
    .hoyolab-main {
        flex-direction: column;
        padding: 16px;
    }
    
    .header-center {
        display: none;
    }
    
    .main-nav {
        display: none;
    }
    
    .site-footer {
        padding: 24px 16px;
    }
    
    .footer-links {
        gap: 12px;
    }
    
    .footer-links a {
        font-size: 0.7rem;
    }
}

/* ========== ÐÐ’Ð¢ÐžÐ Ð˜Ð—ÐÐ¦Ð˜Ð¯ ========== */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    border: 1px solid var(--border);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-dim);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 14px;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.checkbox {
    display: flex;
    align-items: center;
}

.checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
}

.checkbox input {
    width: auto;
}

.btn-full {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #22c55e;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ========== Ð’Ð«ÐŸÐÐ”ÐÐ®Ð©Ð˜Ð• ÐœÐ•ÐÐ® ========== */
.dropdown {
    position: relative;
}

.dropdown-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    transition: color 0.3s;
}

.dropdown-btn:hover {
    color: var(--accent);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 180px;
    z-index: 1000;
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dropdown-menu.open {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

/* ÐœÐµÐ½ÑŽ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-hover);
    padding: 4px 12px;
    border-radius: 40px;
    cursor: pointer;
}

.user-menu {
    /* display: none; */
    /* position: absolute; */
    /* top: 100%; */
    /* right: 0; */
    /* background: var(--bg-card); */
    /* border: 1px solid var(--border); */
    /* border-radius: 12px; */
    /* min-width: 200px; */
    /* margin-top: 8px; */
    /* z-index: 1000; */
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); */
}

.user-menu.open {
    display: block;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s;
}

.user-menu a:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.user-menu i {
    width: 20px;
}

/* ÐÐºÑ‚Ð¸Ð²Ð½Ñ‹Ðµ ÑÑÑ‹Ð»ÐºÐ¸ */
.nav-link.active,
.dropdown-menu a.active,
.user-menu a.active {
    color: var(--accent) !important;
    background: rgba(108, 92, 231, 0.1);
}

/* ========== Ð¡Ð¢Ð ÐÐÐ˜Ð¦Ð« ÐšÐÐ¢Ð•Ð“ÐžÐ Ð˜Ð™ ========== */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-header p {
    color: var(--text-dim);
}

.content-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    color: var(--text-dim);
}

.content-placeholder p {
    margin-bottom: 1rem;
}