/* Main Main Layout wrapper to handle columns */
.main-layout {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: stretch;
    /* Stretch to fill height */
}

.center-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: center;
    justify-content: flex-start;
    /* Changed from center to flex-start to allow header at top */
    height: 100%;
    padding: 0;
    /* Remove padding to let header be full width */
    width: 100%;
    overflow-y: auto;
    /* Allow scrolling within center if needed */
}

header {
    width: 100% !important;
    /* Override 100vw from main styles */
    margin: 0 !important;
}

footer {
    width: 100% !important;
    /* Override if necessary */
    margin-top: auto !important;
    /* Push to bottom of center content */
}

/* Page Footer */
.page-footer {
    background-color: var(--dialog-bg-color);
    color: rgb(var(--text-color));
    text-align: center;
    padding: 15px;
    font-size: 14px;
    margin-top: auto;
    width: 100%;
    z-index: 5;
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Language Dialog - ensure it's above footer */
#language-select-dialog {
    z-index: 100;
}

#language-select-dialog x-background {
    z-index: 100;
}

#language-select-dialog x-paper {
    z-index: 101;
}

/* Features List in About Page */
.features-list {
    margin: 35px 0 25px;
    max-width: 680px;
    width: 100%;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(1, 1fr);
    padding: 0;
}

/* 两列布局 - 大屏幕 */
@media (min-width: 768px) {
    .features-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        max-width: 720px;
    }

    /* 最后一项跨两列（如果总数是奇数） */
    .feature-item:last-child:nth-child(odd) {
        grid-column: span 2;
    }
}

.feature-item {
    display: flex;
    align-items: flex-start;
    padding: 20px 24px;
    background: rgba(30, 30, 30, 0.7);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
    animation: fadeInUp 0.5s ease-out backwards;
}

/* 为每个feature-item添加交错动画延迟 */
.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.15s; }
.feature-item:nth-child(3) { animation-delay: 0.2s; }
.feature-item:nth-child(4) { animation-delay: 0.25s; }
.feature-item:nth-child(5) { animation-delay: 0.3s; }
.feature-item:nth-child(6) { animation-delay: 0.35s; }
.feature-item:nth-child(7) { animation-delay: 0.4s; }
.feature-item:nth-child(8) { animation-delay: 0.45s; }
.feature-item:nth-child(9) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-item:hover {
    background: rgba(40, 40, 40, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.feature-icon {
    font-size: 40px;
    margin-right: 20px;
    min-width: 50px;
    text-align: center;
    line-height: 1;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.feature-text {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 1);
    font-weight: 500;
    letter-spacing: 0.2px;
    padding-top: 5px;
}

/* 暗色主题优化 */
@media (prefers-color-scheme: dark) {
    .feature-item {
        background: rgba(30, 30, 30, 0.85);
        border-color: rgba(255, 255, 255, 0.25);
    }

    .feature-item:hover {
        background: rgba(40, 40, 40, 0.95);
    }
}

/* 明亮主题优化 */
@media (prefers-color-scheme: light) {
    .feature-item {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.2);
        color: rgba(0, 0, 0, 0.9);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .feature-text {
        color: rgba(0, 0, 0, 0.85);
    }

    .feature-item:hover {
        background: rgba(255, 255, 255, 1);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    }

    .feature-icon {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .features-list {
        margin: 30px 0;
        padding: 0;
        gap: 12px;
    }

    .feature-item {
        padding: 16px 18px;
        border-radius: 12px;
    }

    .feature-icon {
        font-size: 36px;
        margin-right: 16px;
        min-width: 44px;
    }

    .feature-text {
        font-size: 17px;
    }
}
