/* 
 * 导航网站样式表
 * 包含现代化设计和动画效果
 */

:root {
    /* 颜色变量 */
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --card-bg-color: #ffffff;
    --text-color: #212529;
    --border-color: #e9ecef;
    --hover-color: #e9f0ff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --vpn-badge-color: #f44336; /* 科学上网标签颜色 */
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
}

.logo h1 span {
    color: var(--primary-color);
}

.search-box {
    display: flex;
    background-color: var(--card-bg-color);
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 3px 10px var(--shadow-color);
    width: 300px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 5px 15px var(--shadow-color);
    transform: translateY(-2px);
}

.search-box input {
    border: none;
    outline: none;
    background: none;
    width: 100%;
    padding: 10px 15px;
    font-size: 16px;
}

.search-box button {
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background-color: #3a5bd9;
    transform: scale(1.05);
}

.add-site-btn button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 10px var(--shadow-color);
    transition: all 0.3s ease;
}

.add-site-btn button:hover {
    background-color: #3a5bd9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* 分类标签 */
.categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.category {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.category:hover {
    background-color: var(--hover-color);
}

.category.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 站点卡片容器 */
.sites-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* 站点卡片 */
.site-card {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 科学上网标签 */
.vpn-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--vpn-badge-color);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 0 0 0 8px;
    z-index: 10;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), #8e9fff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.site-card:hover::before {
    opacity: 1;
}

.site-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.site-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 12px;
    overflow: hidden;
    background-color: #f1f3f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-icon i {
    font-size: 20px;
    color: var(--primary-color);
}

.site-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.site-category {
    background-color: var(--hover-color);
    color: var(--primary-color);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 50px;
    display: inline-block;
}

.site-description {
    margin: 15px 0;
    font-size: 14px;
    color: var(--secondary-color);
    line-height: 1.6;
}

.site-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.visit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.visit-btn:hover {
    background-color: #3a5bd9;
    transform: translateX(3px);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    background-color: var(--border-color);
    color: var(--secondary-color);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.action-btn.delete:hover {
    background-color: #ffebee;
    color: var(--danger-color);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--danger-color);
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
    outline: none;
}

.form-group textarea {
    height: 100px;
    resize: none;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #3a5bd9;
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--secondary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #dae0e5;
}

/* 页脚样式 */
footer {
    margin-top: 50px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.settings {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.settings button {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.settings button:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
}

/* 访客计数器样式 */
.visitor-counter {
    color: var(--secondary-color);
    font-size: 14px;
    padding: 5px 15px;
    background-color: var(--card-bg-color);
    border-radius: 50px;
    box-shadow: 0 2px 8px var(--shadow-color);
    display: inline-block;
    margin: 0 auto 10px;
}

.visitor-counter i {
    color: var(--primary-color);
    margin-right: 5px;
}

#busuanzi_value_site_uv {
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 3px;
}

footer p {
    color: var(--secondary-color);
    font-size: 14px;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sites-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .search-box {
        width: 100%;
    }
    
    footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* 过渡动画 */
.site-card {
    animation: cardAppear 0.5s ease-out;
}

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

/* 通知样式 */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--card-bg-color);
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 5px 15px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 350px;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification-icon {
    font-size: 20px;
}

.notification.success .notification-icon {
    color: var(--success-color);
}

.notification.warning .notification-icon {
    color: var(--warning-color);
}

.notification.error .notification-icon {
    color: var(--danger-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.notification-message {
    font-size: 14px;
    color: var(--secondary-color);
}

.close-notification {
    font-size: 18px;
    cursor: pointer;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.close-notification:hover {
    color: var(--danger-color);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    margin: 30px 0;
}

.empty-state i {
    font-size: 48px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.empty-state p {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.empty-state button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.empty-state button:hover {
    background-color: #3a5bd9;
    transform: translateY(-2px);
} 