/* 马卡龙配色 */
:root {
    /* 主色变量（便于统一管理） */
    --primary: #9f1e32;
    --primary-100: #e5e7eb; /* 浅色用于背景/渐变 */
    --primary-hover: #9f1e32; /* hover 或深色变体：与主色统一 */
    --primary-rgba-25: rgba(159, 30, 50, 0.25);

    /* 兼容旧变量名，模板中可能仍使用 --primary-light */
    --primary-light: var(--primary);

    --secondary-light: var(--primary-100);
    --accent-light: #b2afff;
    --text-dark: #374151;
    --border-color: #e5e7eb;
}

body {
    background-color: #f9fafb;
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.notification-portal {
    position: fixed;
    top: 96px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1200;
    pointer-events: none;
}

.notification-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification-toast {
    --toast-accent: #2563eb;
    width: clamp(260px, 32vw, 360px);
    background: #fff;
    border-radius: 16px;
    padding: 0.9rem 1rem 1rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-left: 4px solid var(--toast-accent);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: relative;
    pointer-events: auto;
}

.notification-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.notification-toast__icon {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--toast-accent);
}

.notification-toast__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.notification-toast__title {
    font-weight: 600;
    font-size: 0.95rem;
}

.notification-toast__message {
    font-size: 0.9rem;
    color: #475467;
    margin: 0;
}

.notification-toast__close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.notification-toast__timer {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--toast-accent);
    opacity: 0.4;
    transform-origin: left;
    animation: toastProgress var(--toast-duration, 5s) linear forwards;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.notification-toast--success { --toast-accent: #22c55e; }
.notification-toast--warning { --toast-accent: #f97316; }
.notification-toast--info { --toast-accent: #0ea5e9; }
.notification-toast--error { --toast-accent: #ef4444; }

.notification-dialog {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 1.5rem;
}

.notification-dialog.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.notification-dialog__panel {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    width: min(420px, 100%);
    box-shadow: 0 25px 65px rgba(15, 23, 42, 0.2);
    display: flex;
    gap: 1rem;
    transform: translateY(12px);
    transition: transform 0.25s ease;
}

.notification-dialog.is-visible .notification-dialog__panel {
    transform: translateY(0);
}

.notification-dialog__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.notification-dialog__body {
    flex: 1;
}

.notification-dialog__text {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #111827;
}

.notification-dialog__close {
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    font-weight: 600;
    cursor: pointer;
}

.notification-dialog__close:hover {
    background: var(--primary-hover);
}

.notification-seed {
    display: none;
}

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 768px) {
    .notification-portal {
        top: 80px;
        left: 0;
        right: 0;
        align-items: center;
    }

    .notification-toast {
        width: calc(100% - 2rem);
        max-width: 420px;
    }
}

.global-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary), #8a1a2b);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

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

.global-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
}

.global-logo .logo-mark-image {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.85);
}

.global-logo .logo-text {
    font-weight: 600;
    line-height: 1.2;
    font-size: 0.95rem;
}

.global-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.global-nav__links {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.global-nav__links a {
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.global-nav__links a:hover,
.global-nav__links a:focus {
    border-color: var(--ruc-gold, #f7d774);
}

.global-nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
    border: none;
    color: #fff;
    cursor: pointer;
}

.user-chip img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-menu {
    position: relative;
}

.user-menu__caret {
    font-size: 0.7rem;
    opacity: 0.8;
}

.user-menu__dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    min-width: 180px;
    background: #fff;
    color: var(--text-dark);
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.15);
    padding: 0.75rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 20;
}

.user-menu__dropdown a {
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
}

.user-menu__dropdown a:hover {
    background: rgba(159,30,50,0.08);
}

.user-menu:hover .user-menu__dropdown,
.user-menu:focus-within .user-menu__dropdown,
.user-menu.open .user-menu__dropdown {
    display: flex;
}

.action-links a {
    color: #fff;
    font-size: 0.9rem;
    text-decoration: none;
    margin-right: 0.75rem;
}

.action-links .btn-link {
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
}

.action-links .btn-solid {
    border-radius: 999px;
    padding: 0.4rem 1.1rem;
    background: #fff;
    color: var(--primary);
    font-weight: 600;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 0.25rem;
}

.nav-toggle span {
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

/* .navbar block removed to avoid conflicts and contrast issues */

.navbar-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.nav-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 5px;
    object-fit: cover;
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 20px;
}

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

.btn {
    border-radius: 8px;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 10px 12px;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem var(--primary-rgba-25);
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .global-header__inner {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: flex;
    }

    .global-nav {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        display: none;
    }

    .global-nav.is-open {
        display: flex;
        max-height: 85vh;
        overflow-y: auto;
        padding-bottom: 1rem;
    }

    .global-nav__links,
    .action-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .global-nav__links a,
    .action-links a {
        width: 100%;
        display: inline-block;
    }

    .global-nav__actions {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .user-chip {
        margin-bottom: 0.5rem;
        width: 100%;
        justify-content: space-between;
    }

    .user-menu__dropdown {
        position: static;
        margin-top: 0.5rem;
        box-shadow: none;
        background: rgba(255,255,255,0.95);
    }
}

/* Mobile improvements for announcements and controls */
@media (max-width: 992px) {
    /* Increase tap targets */
    .quick-filter a {
        padding: 8px 12px;
        font-size: 0.95rem;
        display: inline-block;
        margin-bottom: 8px;
    }

    /* Make accordion items more touch friendly */
    .accordion-button {
        padding: 12px 16px;
        font-size: 1rem;
    }

    .accordion-body {
        font-size: 0.95rem;
        padding: 12px 16px;
    }

    .announcement-item {
        padding: 12px 10px;
    }

    .type-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    /* Slightly smaller avatar in nav on mobile */
    .nav-avatar {
        width: 26px;
        height: 26px;
    }

    /* Reduce card shadow and padding on mobile for denser list */
    .card {
        border-radius: 10px;
        box-shadow: 0 3px 6px rgba(0,0,0,0.06);
    }

    /* Ensure pagination has larger hit areas */
    .pagination .page-link {
        padding: 8px 12px;
    }
}

/* dropdown backup for quick-filter */
.quick-filter-select-wrapper {
    margin-top: 8px;
}
.quick-filter-select {
    max-width: 100%;
}

/* Force dropdown at narrow breakpoints */
@media (max-width: 768px) {
    #quickFilterLinks {
        display: none !important;
    }
    .quick-filter-select-wrapper {
        display: block !important;
    }
}

/* 追加主页面样式 */
.countdown {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-weight: bold;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-1px);
}

.album-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--ruc-red, var(--primary));
    text-decoration: none;
}

.album-card__cta::after {
    content: '\2192';
    transition: transform 0.2s ease;
}

.album-card__cta:hover::after {
    transform: translateX(4px);
}

/* 页面标题样式，确保在浅色背景上也能清晰显示 */
.page-title {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}