/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
    color: #333;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 头部样式 */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: slideDown 0.8s ease-out;
    flex-wrap: wrap;
    text-align: left;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    flex: 1;
    min-width: 200px;
}

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

/* Logo样式 */
.logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: white;
    padding: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* Logo图片样式 + 加载动画 */
.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards 0.3s;
}

@keyframes fadeIn {
    to { 
        opacity: 1; 
    }
}

/* 标题样式 */
.title {
    font-size: 24px;
    color: #333;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.subtitle {
    font-size: 15px;
    color: #666;
    font-weight: 400;
}

/* 按钮网格容器 */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

/* 按钮样式 */
.group-btn {
    background: white;
    border-radius: 16px;
    padding: 20px 15px;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transform: translateY(0);
    animation: buttonFadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

.group-btn:hover, .group-btn:active {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

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

/* 按钮图标 */
.group-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.group-btn:hover .group-icon {
    transform: scale(1.1);
}

/* 按钮文字 */
.group-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.group-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.group-btn:hover .group-name {
    color: #667eea;
}

/* 按钮颜色主题 */
.btn-1 .group-icon { background: #FFE8E8; color: #FF6B6B; }
.btn-2 .group-icon { background: #E8F4FF; color: #3498db; }
.btn-3 .group-icon { background: #E8FFEE; color: #2ecc71; }
.btn-4 .group-icon { background: #FFF5E8; color: #f39c12; }
.btn-5 .group-icon { background: #F8E8FF; color: #9b59b6; }
.btn-6 .group-icon { background: #E8FFFB; color: #1abc9c; }

/* 底部信息 */
.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    animation: fadeIn 1s ease-out 0.6s both;
}

.footer-info {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
    margin-bottom: 5px;
}

/* 联系站长样式 */
.contact-admin {
    margin: 60px auto -30px auto;
    text-align: center;
    padding: 4px 12px;
    background-color: #f9f9f9;
    border-radius: 20px;
    width: fit-content;
    max-width: 240px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.contact-label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    background-color: #f0f0f0;
    padding: 4px 10px;
    border-radius: 15px;
    white-space: nowrap;
    border: 1px solid #ddd;
}

.contact-links {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #555;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    background-color: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.contact-link:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.contact-link i {
    font-size: 16px;
    transition: all 0.3s ease;
}

.email-link:hover { background-color: #ffe6e6; border-color: #ff9999; }
.email-link i { color: #d93025; }
.wechat-link:hover { background-color: #e1f7e1; border-color: #a3d9a3; }
.wechat-link i { color: #07c160; }
.qq-link:hover { background-color: #e1f0ff; border-color: #99ccff; }
.qq-link i { color: #12b7f5; }

/* ✅ 底部版权与备案信息样式（PC端） */
.footer-copyright {
    text-align: center;
    padding: 2px 0;
    font-size: 13px;
    color: #888;
}

.footer-copyright a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-copyright a:hover {
    color: #667eea;
    text-decoration: underline;
}

.footer-beian {
    text-align: center;
    padding: 2px 0 15px 0;
    font-size: 13px;
    color: #888;
}

.footer-beian a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-beian a:hover {
    color: #667eea;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .header {
        flex-direction: row;
        padding: 15px 20px;
        gap: 15px;
        text-align: left;
    }
    
    .logo {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
    }
    
    .header-content {
        min-width: 0;
    }
    
    .title {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .subtitle {
        font-size: 12px;
    }

    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ✅ 移动端专项修复：确保显示且紧凑 */
    .footer-copyright,
    .footer-beian {
        font-size: 12px;
        padding: 3px 10px;
        line-height: 1.4;
        display: block;
        width: 100%;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .title {
        font-size: 26px;
    }
    
    .logo {
        width: 110px;
        height: 110px;
    }
}

@media (min-width: 769px) {
    .button-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .title {
        font-size: 28px;
    }
    
    .logo {
        width: 120px;
        height: 120px;
    }
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 错误状态 */
.error {
    background-color: #fee;
    border-color: #f99;
}

/* 高亮状态 */
.highlight {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }

    .header {
        background: #2d3748;
        border: 2px solid rgba(255, 255, 255, 0.1);
    }
    
    .title {
        color: #e2e8f0;
    }
    
    .subtitle {
        color: #a0aec0;
    }

    .logo {
        background: #4a5568;
    }

    .group-btn {
        background: #2d3748;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    
    .group-name {
        color: #e2e8f0;
    }
    
    .group-desc {
        color: #a0aec0;
    }
    
    .btn-1 .group-icon { background: #4a1c1c; }
    .btn-2 .group-icon { background: #1a365d; }
    .btn-3 .group-icon { background: #1a3c2e; }
    .btn-4 .group-icon { background: #4a3c1a; }
    .btn-5 .group-icon { background: #3a1d4a; }
    .btn-6 .group-icon { background: #1a4a3c; }
    
    .group-btn:hover {
        border-color: rgba(102, 126, 234, 0.4);
    }

    .contact-admin {
        background-color: #2d2d2d;
        border-color: #444;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .contact-label {
        color: #ccc;
        background-color: #3a3a3a;
        border-color: #555;
    }
    
    .contact-link {
        background-color: #3a3a3a;
        border-color: #555;
        color: #ddd;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    
    .contact-link:hover {
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    }
    
    .email-link:hover {
        background-color: #5a3a3a;
        color: #ff6b6b;
        border-color: #8a5a5a;
    }
    
    .wechat-link:hover {
        background-color: #3a5a3a;
        color: #4cd964;
        border-color: #5a7a5a;
    }
    
    .qq-link:hover {
        background-color: #3a4a5a;
        color: #5ac8fa;
        border-color: #5a7a9a;
    }

    .footer-copyright,
    .footer-beian {
        color: #aaa;
    }

    .footer-copyright a,
    .footer-beian a {
        color: #aaa;
    }
}
