/* 主页特定样式 */
body, html {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    display: flex;
    justify-content: center;
}


.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    transition: transform 0.5s ease;
    background: url('../loading.png') center center / contain no-repeat;
    pointer-events: none;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(248, 250, 255, 0.85));
    pointer-events: none;
}

.content {
    position: relative;
    z-index: 2;
    top: 0;
    max-width: 960px;
    width: calc(100% - clamp(12px, 5vw, 60px));
    margin: 0 auto;
    margin-top: calc(var(--content-max-offset, 70vh) - var(--content-shift, 0px));
    margin-bottom: 32px;
    padding: clamp(14px, 4vw, 26px);
    background: var(--bg-dark);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-radius: 32px 32px 18px 18px;
    box-shadow:
        0 -10px 28px rgba(15, 23, 42, 0.08),
        0 14px 40px rgba(15, 23, 42, 0.1);
    min-height: 60vh;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.4) 25%,
        rgba(249, 115, 22, 0.4) 50%,
        rgba(34, 197, 94, 0.35) 75%,
        transparent 100%);
    border-radius: 36px 36px 0 0;
}

/* 投喂按钮样式 - 优化设计 */
.afdian-button-container {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.afdian-button,
.game-button,
.score-button,
.webuid-button {
    border-radius: 999px;
    padding: 6px 18px;
    min-height: 32px;
    font-size: 0.9em;
    font-weight: 600;
    border-width: 1.5px;
    border-style: solid;
    background: transparent;
    box-shadow: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.afdian-button {
    color: #047857 !important;
    border-color: rgba(16, 185, 129, 0.7);
}

.afdian-button:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(5, 150, 105, 0.9);
}

.game-button {
    color: #b45309 !important;
    border-color: rgba(245, 158, 11, 0.7);
}

.game-button:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(217, 119, 6, 0.9);
}

.score-button {
    color: #1d4ed8 !important;
    border-color: rgba(59, 130, 246, 0.7);
}

.score-button:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(37, 99, 235, 0.9);
}

.webuid-button {
    color: #0f766e !important;
    border-color: rgba(45, 212, 191, 0.7);
}

.webuid-button:hover {
    background: rgba(45, 212, 191, 0.1);
    border-color: rgba(13, 148, 136, 0.9);
}

.other-features-section {
    margin-top: 24px;
}

.section-label {
    margin: 0;
}

.section-heading {
    margin-top: 0;
}

.other-feature-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.other-feature-item {
    background: rgba(255, 214, 142, 0.12);
    border-left: 3px solid rgba(217, 137, 6, 0.9);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.92em;
}

.item-title small {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.85em;
}

.other-feature-item p {
    margin: 0;
    line-height: 1.45;
    font-size: 0.88em;
    color: var(--text-secondary);
}

.feature-actions {
    margin-top: 4px;
}

.feature-note {
    color: var(--accent-color);
    font-size: 0.82em;
}

.center-note {
    text-align: center;
    margin-top: 12px;
}

.admin-grid {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

/* 二维码轮播 */
.qrcode {
    display: flex;
    justify-content: left;
    margin-top: 20px;
}

.qrcode img {
    max-width: 300px;
    width: 90%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.qrcode-carousel {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px;
    scroll-behavior: smooth;
}

.carousel-track {
    display: flex;
    gap: 20px;
    padding: 0 10px;
}

.carousel-item {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 240px;
    text-align: center;
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    box-shadow:
        0 14px 32px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        var(--accent-color),
        var(--gold-accent),
        var(--accent-color));
    border-radius: 20px 20px 0 0;
}

.carousel-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow:
        0 12px 32px rgba(58, 89, 152, 0.25),
        0 6px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(58, 89, 152, 0.4);
}

.carousel-item img {
    width: 100%;
    border-radius: 18px;
    box-shadow:
        0 18px 28px rgba(15, 23, 42, 0.18);
    margin-bottom: 16px;
    transition: all 0.3s ease;
    border: 2px solid rgba(148, 163, 184, 0.4);
}

.carousel-item:hover img {
    transform: scale(1.05);
    box-shadow:
        0 8px 28px rgba(58, 89, 152, 0.3),
        0 6px 16px rgba(0, 0, 0, 0.4);
    border-color: rgba(58, 89, 152, 0.5);
}

.carousel-item p {
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    text-shadow: none;
    font-size: 0.95em;
}

/* 装饰性元素 */
.decorative-leaf {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--verina-green);
    border-radius: 60% 40% 55% 45%;
    opacity: 0.12;
    animation: float 8s ease-in-out infinite;
    filter: blur(0.5px);
}

.decorative-leaf:nth-child(1) {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.decorative-leaf:nth-child(2) {
    top: 20%;
    right: 8%;
    animation-delay: 2s;
}

.decorative-leaf:nth-child(3) {
    bottom: 15%;
    left: 10%;
    animation-delay: 4s;
}

/* 浮动装饰元素（引自 xwocr） */
.floating-decoration {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    font-size: 24px;
    opacity: 0.15;
}

.float-left {
    animation: drift-left 8s ease-in-out infinite;
}

.float-right {
    animation: drift-right 8s ease-in-out infinite;
}

.float-gentle {
    animation: slow-float 6s ease-in-out infinite;
}

/* 粒子效果 */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    opacity: 0.4;
    animation: particle-float 8s infinite linear;
}

.particle:nth-child(odd) {
    background: rgba(16, 185, 129, 0.5);
    animation-duration: 10s;
}

.particle:nth-child(3n) {
    background: rgba(245, 158, 11, 0.5);
    animation-duration: 12s;
}

.particle-1 { left: 10%; animation-delay: 0s; }
.particle-2 { left: 20%; animation-delay: 1s; }
.particle-3 { left: 30%; animation-delay: 2s; }
.particle-4 { left: 40%; animation-delay: 3s; }
.particle-5 { left: 50%; animation-delay: 4s; }
.particle-6 { left: 60%; animation-delay: 5s; }
.particle-7 { left: 70%; animation-delay: 6s; }
.particle-8 { left: 80%; animation-delay: 7s; }
.particle-9 { left: 90%; animation-delay: 8s; }

/* 光晕效果 */
.glow-effect {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

.glow-effect:nth-child(2) {
    top: 20%;
    right: 10%;
    animation-delay: 1s;
}

.glow-effect:nth-child(3) {
    bottom: 30%;
    left: 15%;
    animation-delay: 2s;
}

/* 联系主人样式 - 简洁设计 */
.contact-footer {
    text-align: center;
    padding: 16px 0;
    margin-top: 20px;
    font-size: 0.9em;
    color: var(--text-secondary);
    border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.contact-link {
    color: #2563eb !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.contact-link:hover {
    color: var(--light-accent) !important;
    background: rgba(58, 89, 152, 0.1);
    text-decoration: none;
}

/* 动画定义 */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes glow-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes drift-left {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateX(-30px) translateY(-20px) rotate(10deg);
        opacity: 0.2;
    }
    100% {
        transform: translateX(0) translateY(-40px) rotate(-5deg);
        opacity: 0.1;
    }
}

@keyframes drift-right {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateX(30px) translateY(-20px) rotate(-10deg);
        opacity: 0.2;
    }
    100% {
        transform: translateX(0) translateY(-40px) rotate(5deg);
        opacity: 0.1;
    }
}

@keyframes slow-float {
    0%, 100% {
        transform: translateY(0px);
        opacity: 0.12;
    }
    50% {
        transform: translateY(-15px);
        opacity: 0.2;
    }
}

/* 卡片动画 */
.card:nth-child(even) {
    animation: slideInRight 0.8s ease-out;
}

.card:nth-child(odd) {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content {
        margin-top: clamp(220px, 60vh, 420px);
        padding: 16px;
    }

    .card {
        padding: 14px;
    }

    .afdian-button-container {
        justify-content: center;
        gap: 10px;
    }

    .afdian-button, .game-button, .score-button, .webuid-button {
        padding: 6px 16px;
        font-size: 0.85em;
    }

    .other-feature-item {
        padding: 10px 12px;
    }

    .announcement-card {
        margin-top: 0;
    }

    /* 联系信息响应式 */
    .contact-footer {
        font-size: 0.85em;
        padding: 12px 0;
    }

    .carousel-item {
        width: 180px;
        padding: 16px;
    }

    .carousel-item img {
        border-width: 1px;
    }

    .carousel-track {
        gap: 16px;
        padding: 0 5px;
    }

    .decorative-leaf {
        display: none;
    }

    .particle {
        display: none;
    }

    .glow-effect {
        display: none;
    }
}

@media (max-width: 480px) {
    .content {
        margin-top: clamp(200px, 56vh, 420px);
        padding: 14px;
        min-height: 75vh;
    }

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

    .card h2, .card h3 {
        font-size: 1.2em;
        margin-bottom: 0.8em;
    }

    .afdian-button-container {
        margin-top: 16px;
        justify-content: center;
        text-align: center;
    }

    .afdian-button, .game-button, .score-button, .webuid-button {
        padding: 6px 14px;
        min-height: 30px;
        font-size: 0.8em;
    }

    .feature-btn {
        font-size: 0.78em;
    }

    .announcement-card {
        margin-top: 4px;
    }

    .card a.btn {
        padding: 10px 16px;
        min-height: 30px;
        display: inline-flex;
        align-items: center;
        font-size: 0.85em;
    }

    /* 联系信息小屏幕样式 */
    .contact-footer {
        font-size: 0.8em;
        padding: 10px 0;
    }

    .carousel-item {
        width: 160px;
        padding: 12px;
    }

    .carousel-item p {
        font-size: 0.85em;
    }
}

@media (max-width: 360px) {
    .content {
        margin-top: clamp(240px, 58vh, 460px);
        padding: 12px;
    }

    .card {
        padding: 12px;
    }

    .carousel-item {
        width: 140px;
        padding: 10px;
    }

    .afdian-button, .game-button, .score-button, .webuid-button {
        padding: 6px 12px;
        font-size: 0.75em;
        min-height: 28px;
    }

    .feature-btn {
        font-size: 0.75em;
    }

    .announcement-card {
        margin-top: 6px;
    }

    .card a,
    .afdian-button,
    .game-button,
    .score-button,
    .webuid-button {
        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.2);
        touch-action: manipulation;
    }

    /* 联系信息超小屏幕样式 */
    .contact-footer {
        font-size: 0.75em;
        padding: 8px 0;
    }

    .contact-link {
        -webkit-tap-highlight-color: rgba(58, 89, 152, 0.2);
        touch-action: manipulation;
    }
}
.announcement-card {
    margin-top: 0;
    box-shadow:
        0 20px 45px rgba(239, 68, 68, 0.18),
        0 6px 18px rgba(15, 23, 42, 0.12);
}
