:root {
    --tint-color: 255, 255, 255;
    --tint-opacity: 0.06;
    --shadow-blur: 20px;
    --shadow-spread: -5px;
    --shadow-color: rgba(255, 255, 255, 0.45);
    --outer-shadow-blur: 24px;
    --glass-radius: 60px;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #0a0e27;
    color: #e0e6ff;
    position: relative;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   背景层
   ======================================== */

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
    filter: brightness(0.7) saturate(1.1);
}

.background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.1) 0%, rgba(10, 14, 39, 0.1) 100%);
    z-index: 1;
}

/* ========================================
   主容器
   ======================================== */

.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    z-index: 1;
}

/* ========================================
   头部区域
   ======================================== */

.header {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInDown 0.8s ease-out;
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(#ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-shadow: 0 20px 40px rgba(255, 107, 157, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(224, 230, 255, 0.7);
    font-weight: 300;
    letter-spacing: 1px;
}

/* ========================================
   卡片网格
   ======================================== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    margin-bottom: 60px;
}

/* ========================================
    毛玻璃卡片
    ======================================== */

.glassDiv {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: var(--glass-radius);
    cursor: pointer;
    isolation: isolate;
    touch-action: none;
    overflow: hidden;
    box-shadow: 0px 4px var(--outer-shadow-blur) rgba(194, 194, 194, 0.18);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.623);
}

.glassDiv:hover {
    border-color: rgba(255, 154, 158, 0.45);
}

.glassDiv:active {
    border-color: rgba(255, 154, 158, 0.6);
}

/* 毛玻璃背景层 */
.glassDiv::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}

/* 毛玻璃装饰层 */
.glassDiv::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    pointer-events: none;
    /* 内阴影 */
    box-shadow: 
        inset 0 0 var(--shadow-blur) var(--shadow-spread) var(--shadow-color),
        /* 左上角高光 */
        inset 0.5px 0.5px 2px rgba(255, 255, 255, 0.3),
        /* 右下角阴影 */
        inset -0.5px -0.5px 2px rgba(0, 0, 0, 0.2);
}

.glassDiv:hover::after {
    box-shadow:
        inset 0 0 var(--shadow-blur) var(--shadow-spread) rgba(255, 190, 210, 0.55),
        inset 0.5px 0.5px 2px rgba(255, 255, 255, 0.36),
        inset -0.5px -0.5px 2px rgba(0, 0, 0, 0.24);
}

/* ========================================
   卡片内容
   ======================================== */

.card-content {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 2;
    gap: 15px;
}

.card-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    line-height: 1;
    animation: float 3s ease-in-out infinite;
}

.card-icon .favicon-icon {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
    display: none;
}

.card-icon.has-favicon {
    font-size: 0;
}

.card-icon.has-favicon .favicon-icon {
    display: block;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.card-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #e0e6ff;
    transition: color 0.3s ease;
    margin: 10px 0 5px;
}

.glassDiv:hover .card-title {
    color: #ff9a9e;
}

.card-desc {
    font-size: 0.95rem;
    color: rgba(224, 230, 255, 0.6);
    transition: color 0.3s ease;
}

.glassDiv:hover .card-desc {
    color: rgba(224, 230, 255, 0.8);
}

/* ========================================
   底部信息
   ======================================== */

.footer {
    position: absolute;
    bottom: 30px;
    text-align: center;
    color: rgba(224, 230, 255, 0.5);
    font-size: 0.9rem;
    animation: fadeInUp 0.8s ease-out 0.3s both;
    z-index: 2;
}

.footer:hover {
    color: rgba(224, 230, 255, 0.8);
}

/* ========================================
   动画
   ======================================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.glassDiv {
    animation: fadeInUp 0.6s ease-out both;
}

.glassDiv:nth-child(1) { animation-delay: 0.1s; }
.glassDiv:nth-child(2) { animation-delay: 0.2s; }
.glassDiv:nth-child(3) { animation-delay: 0.3s; }
.glassDiv:nth-child(4) { animation-delay: 0.4s; }
.glassDiv:nth-child(5) { animation-delay: 0.5s; }
.glassDiv:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .header {
        margin-bottom: 60px;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }

    .glassDiv {
        height: 250px;
    }

    .card-content {
        padding: 30px 20px;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 30px 15px;
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .glassDiv {
        height: 220px;
        border-radius: 16px;
    }

    .card-content {
        padding: 25px 15px;
    }

    .card-icon {
        font-size: 2.5rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .footer {
        font-size: 0.8rem;
    }
}

/* ========================================
   亮色模式支持
   ======================================== */

@media (prefers-color-scheme: light) {
    body {
        background-color: #f5f7fa;
        color: #2d3748;
    }

    .title {
        background: linear-gradient(135deg, #ff6b9d 0%, #c06c84 25%, #6c5fc7 50%, #a6acaf 75%, #ff9a9e 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .subtitle {
        color: rgba(45, 55, 72, 0.7);
    }

    .card-desc {
        color: rgba(45, 55, 72, 0.6);
    }

    .footer {
        color: rgba(45, 55, 72, 0.5);
    }
}
