/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(52, 152, 219, 0.1)"/></svg>');
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.2) 100%);
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #3498db, #1abc9c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(52, 152, 219, 0.2);
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 主要内容区域 */
main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* 管理页面的主要内容区域 */
#adminContainer main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* 友链展示区域 */
.friend-links, .friend-links-full {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* 全宽友链展示区域 */
.friend-links-full {
    grid-column: 1 / -1;
}

.friend-link {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 16px;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.friend-link::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.friend-link:hover::before {
    opacity: 1;
}

.friend-link:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(31, 38, 135, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.7);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 100%);
    animation: pulse 2s infinite;
}

.friend-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid transparent;
    background: linear-gradient(45deg, #3498db, #1abc9c) border-box;
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.friend-avatar:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
    animation: float 3s ease-in-out infinite;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.friend-desc {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

/* 友链信息样式调整 */
.friend-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 添加友链表单区域 */
.add-link {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.2) 100%);
}

.add-link h2 {
    font-size: 1.5rem;
    color: #3498db;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(31, 38, 135, 0.1) inset;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(52, 152, 219, 0.8);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #3498db, #1abc9c);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

button[type="submit"]:hover {
    background: linear-gradient(45deg, #1abc9c, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.5);
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    position: relative;
}

/* 管理员入口样式 */
.admin-link {
    margin-top: 20px;
}

.admin-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(31, 38, 135, 0.1);
}

.admin-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(31, 38, 135, 0.2);
    color: #3498db;
}

/* 管理员按钮样式已在上方完全定义 */
}

.admin-btn:hover {
    background-color: #2980b9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .friend-links {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 480px) {
    header {
        padding: 20px 0;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .friend-links {
        padding: 15px;
    }
    
    .friend-link {
        padding: 10px;
    }
    
    .friend-avatar {
        width: 50px;
        height: 50px;
    }
}