/**
 * 官网专用 ZaUI 引入文件
 * 只取主题变量 + 图标字体，不引入会破坏官网样式的 reset
 */

/* ========== 字体 ========== */
@font-face {
    font-family: 'Material Symbols Rounded';
    font-style: normal;
    font-weight: 100 700;
    font-display: block;
    src: url('./material-symbols-rounded.woff2') format('woff2');
}

/* ========== 主题变量（暗色，对应官网 data-theme="dark"） ========== */
[data-theme=light] {
    --background-color: #fff;
    --shadow-color: #fbfbfb;
    --text-0: #000;
    --text-9: rgba(0,0,0,.9);
    --text-8: rgba(0,0,0,.8);
    --text-7: rgba(0,0,0,.7);
    --text-6: rgba(0,0,0,.6);
    --text-5: rgba(0,0,0,.5);
    --text-4: rgba(0,0,0,.4);
    --text-3: rgba(0,0,0,.3);
    --text-2: rgba(0,0,0,.2);
    --text-1: rgba(0,0,0,.1);
    --text-title-color: #000;
    --text-primary-color: #000;
    --text-secondary-color: rgba(0,0,0,.5);
    --text-desc: rgba(0,0,0,.7);
    --text-disable: #ccc;
    --theme-color: #0d84ff;
    --theme-color-light: rgba(13,132,255,.1);
    --theme-color-grey: #8c93b0;
    --darken-theme-color: #004c80;
    --header-color1: #1e8cff;
    --header-color2: #30adff;
    --divider-color: rgba(0,0,0,.1);
    --line-color: rgba(0,0,0,.1);
    --button-background-color: rgba(0,0,0,.06);
    --button-text: rgba(0,0,0,.7);
    --btn-background-color: rgba(0,0,0,.06);
    --icon-color: #333;
    --filter-value: invert(0%);
    --system-red: #f22424;
    --system-red-background: rgba(242,36,36,.1);
    --system-yellow: #fb0;
    --system-yellow-background: rgba(255,187,0,.1);
    --darken-text-desc: rgba(0,0,0,.35);
    --toast-background: #fff;
    --toast-border: rgba(0,0,0,.06);
    --modal-background-color: #fff;
    --card-background: #fff;
    --card-shadow: 0 2px 8px rgba(0,0,0,.08);
    --toolbox-background-color: #fff;
    --quick-background: #fff;
    --placeholder: #f6f6f6;
    --guide-section-color: #e7f3ff;
    --center-text: rgba(0,0,0,.8);
    --devcard-background-color: rgba(0,0,0,.02);
    --devcard-header-color: rgba(0,0,0,.03);
    --devcard-point-color: rgba(0,0,0,.05);
    --devcard-head-text-color: rgba(0,0,0,.4);
}

[data-theme=dark] {
    --background-color: #000;
    --shadow-color: #191919;
    --text-0: #fff;
    --text-9: hsla(0,0%,100%,.9);
    --text-8: hsla(0,0%,100%,.8);
    --text-7: hsla(0,0%,100%,.7);
    --text-6: hsla(0,0%,100%,.6);
    --text-5: hsla(0,0%,100%,.5);
    --text-4: hsla(0,0%,100%,.4);
    --text-3: hsla(0,0%,100%,.3);
    --text-2: hsla(0,0%,100%,.2);
    --text-1: hsla(0,0%,100%,.1);
    --text-title-color: #fff;
    --text-primary-color: hsla(0,0%,100%,.7);
    --text-secondary-color: hsla(0,0%,100%,.5);
    --text-desc: hsla(0,0%,100%,.7);
    --text-disable: #535353;
    --theme-color: #0073dd;
    --theme-color-light: rgba(84,146,240,.3);
    --theme-color-grey: #8c93b0;
    --darken-theme-color: #004f99;
    --header-color1: #20378c;
    --header-color2: #4a5195;
    --divider-color: hsla(0,0%,100%,.1);
    --line-color: hsla(0,0%,100%,.1);
    --button-background-color: hsla(0,0%,100%,.1);
    --button-text: hsla(0,0%,100%,.8);
    --btn-background-color: hsla(0,0%,100%,.04);
    --icon-color: #888;
    --filter-value: invert(68%);
    --system-red: #f22424;
    --system-red-background: rgba(242,36,36,.1);
    --system-yellow: #fb0;
    --system-yellow-background: rgba(255,187,0,.1);
    --darken-text-desc: hsla(0,0%,100%,.35);
    --toast-background: #222224;
    --toast-border: transparent;
    --modal-background-color: #222224;
    --card-background: #222224;
    --card-shadow: 0 2px 8px rgba(0,0,0,.3);
    --toolbox-background-color: #222224;
    --quick-background: #222224;
    --placeholder: #222224;
    --guide-section-color: #192c48;
    --center-text: #fff;
    --devcard-background-color: #111;
    --devcard-header-color: hsla(0,0%,100%,.03);
    --devcard-point-color: hsla(0,0%,100%,.05);
    --devcard-head-text-color: hsla(0,0%,92.2%,.5);
}

/* ========== 图标基础样式 ========== */
.mdui-icon,
.material-icons,
.za-icon {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* 继承父元素颜色，官网 body 是白色文字，图标自然跟着白 */
    color: inherit;
    font-size: 24px;
    /* 不固定 width/height，让内联图标可以被 font-size 自由控制 */
}

/* ========== Appbar / Toolbar ========== */
.mdui-appbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.mdui-appbar-fixed {
    position: fixed;
}

.mdui-toolbar {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0 8px;
}

.mdui-typo-title {
    font-size: 20px;
    line-height: 28px;
    color: inherit;
    font-weight: 500;
    text-decoration: none;
}

.mdui-toolbar-spacer {
    flex: 1;
}

/* ========== 按钮 ========== */
.mdui-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0 16px;
    height: 36px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255,255,255,.1);
    color: inherit;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
}

.mdui-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.mdui-btn-raised {
    box-shadow: 0 2px 4px rgba(0,0,0,.2);
}

.mdui-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: auto;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    color: inherit;
    text-decoration: none;
    vertical-align: middle;
}

.mdui-btn-icon:active {
    background: rgba(255,255,255,.1);
}

/* ========== 颜色 ========== */
.mdui-color-theme {
    background-color: #2196F3 !important;
    color: #fff !important;
}

.mdui-color-theme-accent {
    background-color: #2196F3 !important;
    color: #fff !important;
}

/* ========== 栅格 ========== */
.mdui-container {
    width: 100%;
    padding: 0 16px;
    margin: 0 auto;
    box-sizing: border-box;
}

.mdui-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;
}

.mdui-row > [class*="mdui-col-"] {
    padding: 0 8px;
    box-sizing: border-box;
}

/* xs 列（手机，始终生效） */
.mdui-col-xs-1  { flex: 0 0 8.333333%;  max-width: 8.333333%; }
.mdui-col-xs-2  { flex: 0 0 16.666667%; max-width: 16.666667%; }
.mdui-col-xs-3  { flex: 0 0 25%;        max-width: 25%; }
.mdui-col-xs-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
.mdui-col-xs-5  { flex: 0 0 41.666667%; max-width: 41.666667%; }
.mdui-col-xs-6  { flex: 0 0 50%;        max-width: 50%; }
.mdui-col-xs-7  { flex: 0 0 58.333333%; max-width: 58.333333%; }
.mdui-col-xs-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
.mdui-col-xs-9  { flex: 0 0 75%;        max-width: 75%; }
.mdui-col-xs-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.mdui-col-xs-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.mdui-col-xs-12 { flex: 0 0 100%;       max-width: 100%; }

/* sm 列（≥600px） */
@media (min-width: 600px) {
    .mdui-col-sm-1  { flex: 0 0 8.333333%;  max-width: 8.333333%; }
    .mdui-col-sm-2  { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .mdui-col-sm-3  { flex: 0 0 25%;        max-width: 25%; }
    .mdui-col-sm-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .mdui-col-sm-5  { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .mdui-col-sm-6  { flex: 0 0 50%;        max-width: 50%; }
    .mdui-col-sm-7  { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .mdui-col-sm-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .mdui-col-sm-9  { flex: 0 0 75%;        max-width: 75%; }
    .mdui-col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .mdui-col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .mdui-col-sm-12 { flex: 0 0 100%;       max-width: 100%; }
}

/* md 列（≥900px） */
@media (min-width: 900px) {
    .mdui-col-md-1  { flex: 0 0 8.333333%;  max-width: 8.333333%; }
    .mdui-col-md-2  { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .mdui-col-md-3  { flex: 0 0 25%;        max-width: 25%; }
    .mdui-col-md-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .mdui-col-md-5  { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .mdui-col-md-6  { flex: 0 0 50%;        max-width: 50%; }
    .mdui-col-md-7  { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .mdui-col-md-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .mdui-col-md-9  { flex: 0 0 75%;        max-width: 75%; }
    .mdui-col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .mdui-col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .mdui-col-md-12 { flex: 0 0 100%;       max-width: 100%; }
}

/* ========== Panel 折叠面板 ========== */
.mdui-panel {
    overflow: hidden;
    border-radius: 8px;
}

.mdui-panel-item {
    border-bottom: 1px solid rgba(255,255,255,.08);
    transition: none;
}

.mdui-panel-item:last-child {
    border-bottom: none;
}

.mdui-panel-item-header {
    padding: 16px 24px;
    font-size: 16px;
    line-height: 24px;
    color: inherit;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.mdui-panel-item-header::after {
    content: 'expand_more';
    font-family: 'Material Symbols Rounded';
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    font-size: 24px;
    color: rgba(255,255,255,.4);
    transition: transform 0.3s cubic-bezier(0.3, 0, 0, 1);
    flex-shrink: 0;
}

.mdui-panel-item.mdui-panel-item-open .mdui-panel-item-header::after {
    transform: rotate(180deg);
}

.mdui-panel-item-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.3, 0, 0, 1);
}

.mdui-panel-item.mdui-panel-item-open .mdui-panel-item-body {
    max-height: 2000px;
}

.mdui-panel-item-body p {
    padding: 0 24px 16px;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,.6);
    margin: 0;
}

/* ========== Spinner 加载动画 ========== */
@keyframes mdui-spinner-rotate {
    100% { transform: rotate(360deg); }
}

@keyframes mdui-spinner-dash {
    0%   { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }
    50%  { stroke-dasharray: 89, 200; stroke-dashoffset: -35px; }
    100% { stroke-dasharray: 89, 200; stroke-dashoffset: -124px; }
}

.mdui-spinner {
    width: 40px;
    height: 40px;
    position: relative;
    animation: mdui-spinner-rotate 2s linear infinite;
    display: inline-block;
}

.mdui-spinner-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-color: #2196F3;
}

.mdui-spinner-colorful .mdui-spinner-layer:nth-child(1) { border-color: #2196F3; }
.mdui-spinner-colorful .mdui-spinner-layer:nth-child(2) { border-color: #4CAF50; animation-delay: 0.15s; }
.mdui-spinner-colorful .mdui-spinner-layer:nth-child(3) { border-color: #FF9800; animation-delay: 0.3s; }
.mdui-spinner-colorful .mdui-spinner-layer:nth-child(4) { border-color: #F44336; animation-delay: 0.45s; }

.mdui-spinner-circle {
    box-sizing: border-box;
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid;
    border-color: inherit;
    border-radius: 50%;
    border-bottom-color: transparent !important;
    animation: mdui-spinner-dash 1.5s ease-in-out infinite;
}

/* ========== Ripple 波纹 ========== */
.mdui-ripple {
    position: relative;
    overflow: hidden;
}

/* ========== Select ========== */
.mdui-select {
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: 4px;
    color: inherit;
    font-size: 14px;
    padding: 6px 12px;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.mdui-select option {
    background: #333;
    color: #fff;
}

/* ========== Textfield 搜索框 ========== */
.mdui-textfield {
    position: relative;
    margin-bottom: 16px;
}

.mdui-textfield-floating-label {
    position: relative;
}

.mdui-textfield .mdui-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: rgba(255,255,255,.5);
}

.mdui-textfield-label {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: rgba(255,255,255,.4);
    transition: all 0.2s;
    pointer-events: none;
}

.mdui-textfield-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    font-size: 14px;
    line-height: 20px;
    color: #fff;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.mdui-textfield-input:focus {
    border-color: #2196F3;
}

.mdui-textfield-input:focus ~ .mdui-textfield-label,
.mdui-textfield-input:not(:placeholder-shown) ~ .mdui-textfield-label {
    top: 0;
    left: 44px;
    font-size: 11px;
    color: #2196F3;
    background: #1a1a1a;
    padding: 0 4px;
    transform: translateY(-50%);
}

.mdui-textfield-input::placeholder {
    color: transparent;
}

.mdui-textfield-input:focus::placeholder {
    color: rgba(255,255,255,.3);
}

/* ========== ZaUI Select 下拉选择（官网用） ========== */
.za-select-wrapper {
    position: relative;
    display: inline-block;
    min-width: 120px;
}

.za-select-wrapper select {
    display: none;
}

.za-select-custom {
    position: relative;
    padding: 6px 36px 6px 14px;
    font-size: 14px;
    line-height: 20px;
    color: #fff;
    background: rgba(255,255,255,.12);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    white-space: nowrap;
    user-select: none;
}

.za-select-custom:active {
    background: rgba(255,255,255,.18);
}

.za-select-custom-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Material Symbols Rounded';
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    font-style: normal;
    font-size: 18px;
    color: rgba(255,255,255,.6);
    transition: transform 0.25s cubic-bezier(0.3, 0, 0, 1);
    pointer-events: none;
    line-height: 1;
}

.za-select-custom.active .za-select-custom-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.za-select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100%;
    background: #2a2a2a;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.22s cubic-bezier(0.3, 0, 0, 1);
    z-index: 1000;
}

.za-select-dropdown.show {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
    overflow-y: auto;
}

.za-select-option {
    padding: 10px 16px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.za-select-option:first-child { border-radius: 12px 12px 0 0; }
.za-select-option:last-child  { border-radius: 0 0 12px 12px; }
.za-select-option:only-child  { border-radius: 12px; }

.za-select-option:hover { background: rgba(255,255,255,.08); }
.za-select-option:active { background: rgba(255,255,255,.14); }

.za-select-option.selected { color: #2196F3; }
.za-select-option.selected::after {
    content: 'check';
    font-family: 'Material Symbols Rounded';
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    font-style: normal;
    font-size: 18px;
    margin-left: 8px;
}

.za-select-option.disabled {
    color: rgba(255,255,255,.3);
    cursor: not-allowed;
}
.za-select-option.disabled:hover { background: transparent; }

.za-select-mask {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 999;
    display: none;
}
.za-select-mask.show { display: block; }

/* ========== 活动卡片（index + activities 页动态生成） ========== */
.activity-card {
    display: block;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: transform .18s, border-color .18s;
    height: 100%;
}
.activity-card:hover  { border-color: rgba(255,255,255,.18); }
.activity-card:active { transform: scale(0.97); }

.activity-card-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #2a2a2a;
}

.activity-card-body {
    padding: 14px 16px 16px;
}

.activity-card-title {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.4;
}

.activity-card-date {
    font-size: 12px;
    color: rgba(255,255,255,.35);
    margin-bottom: 8px;
}

.activity-card-desc {
    font-size: 13px;
    color: rgba(255,255,255,.5);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片网格容器 */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
