:root {
    --primary-gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(135deg, #13f1fc 0%, #0470dc 100%);
    --rating-color: #ff9d00;
    --text-primary: #333;
    --text-secondary: #666;
    --bg-primary: #f8f9fa;
    --bg-card: #ffffff;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    padding: 60px 0;
    background: var(--primary-gradient);
    color: white;
    margin-bottom: 40px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
}

.header p {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

.website-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 25px;
}

.website-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    padding: 25px;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    gap: 20px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.website-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary-gradient);
}

.website-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* 第一列：图标 */
.website-icon-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.website-card .icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 5px;
    background: white;
    transition: transform 0.3s ease;
}

.default-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.website-card:hover .icon {
    transform: scale(1.05);
}

/* 第二列：网站信息 */
.website-info-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.website-card h2 {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
}

.website-url {
    margin-bottom: 8px;
    word-break: break-all;
}

.website-url a {
    color: #4a6cf7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    display: inline-block;
    position: relative;
}

.website-url a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #4a6cf7;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.website-url a:hover {
    color: #2541b2;
}

.website-url a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.website-card .description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 第三列：操作和评分 */
.website-action-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.visit-btn {
    display: inline-block;
    width: 100%;
    padding: 10px;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.visit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0470dc 0%, #13f1fc 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.visit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3);
}

.visit-btn:hover::before {
    opacity: 1;
}

.rating {
    color: var(--rating-color);
    font-size: 1.2rem;
    text-align: center;
}

.admin-panel {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
}

.admin-panel h2 {
    margin-bottom: 25px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 10px;
}

.admin-panel h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 60px;
    background: var(--secondary-gradient);
    border-radius: 3px;
}

form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="text"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: var(--text-primary);
    background-color: #fff;
}

input[type="text"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
    outline: none;
}

input[type="file"] {
    padding: 10px 0;
}

button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.3);
}

button:hover::before {
    opacity: 1;
}

.delete-btn {
    background: linear-gradient(135deg, #f5515f 0%, #9f041b 100%);
    box-shadow: 0 4px 15px rgba(245, 81, 95, 0.2);
}

.delete-btn::before {
    background: linear-gradient(135deg, #9f041b 0%, #f5515f 100%);
}

.delete-btn:hover {
    box-shadow: 0 6px 20px rgba(245, 81, 95, 0.3);
}

.website-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.website-table th, 
.website-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}

.website-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-primary);
}

.website-table tr:last-child td {
    border-bottom: none;
}

.website-table tr:hover td {
    background-color: #f9fafc;
}

.message {
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 8px;
    position: relative;
    padding-left: 45px;
}

.message::before {
    font-family: "Font Awesome 5 Free", sans-serif;
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.success {
    background-color: #e3f8e5;
    color: #0f5132;
}

.success::before {
    content: "\f058"; /* Font Awesome check-circle icon */
    color: #0f5132;
}

.error {
    background-color: #f8e3e3;
    color: #842029;
}

.error::before {
    content: "\f057"; /* Font Awesome times-circle icon */
    color: #842029;
}

/* 响应式布局 */
@media (max-width: 700px) {
    .website-grid {
        grid-template-columns: 1fr;
    }
    
    .website-card {
        grid-template-columns: 60px 1fr 100px;
        gap: 15px;
    }
    
    .header {
        padding: 40px 0;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .header p {
        font-size: 1.1rem;
    }
}

@media (max-width: 500px) {
    .website-card {
        grid-template-columns: 60px 1fr;
        grid-template-areas:
            "icon info"
            "action action";
        gap: 15px;
        padding: 20px;
    }
    
    .website-icon-column {
        grid-area: icon;
    }
    
    .website-info-column {
        grid-area: info;
    }
    
    .website-action-column {
        grid-area: action;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        margin-top: 10px;
    }
    
    .visit-btn {
        width: auto;
        padding: 8px 15px;
    }
    
    .admin-panel {
        padding: 20px;
    }
}

/* 页脚样式 */
footer {
    margin-top: 60px;
}

.footer-content {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content a {
    color: #4a6cf7;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-content a:hover {
    color: #2541b2;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    box-shadow: var(--shadow-soft);
    font-size: 1.1rem;
}

.no-results i {
    margin-right: 8px;
    color: #4a6cf7;
}

/* 管理界面额外样式 */
.radio-options {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.radio-option {
    display: flex;
    align-items: center;
}

.inline-label {
    display: inline;
    margin: 0 0 0 5px;
    font-weight: normal;
}

.file-input {
    background-color: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 15px;
    width: 100%;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: #4a6cf7;
    background-color: #f0f7ff;
}

.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.back-btn {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.table-link {
    color: #4a6cf7;
    text-decoration: none;
    transition: color 0.2s ease;
}

.table-link:hover {
    color: #2541b2;
    text-decoration: underline;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 20px 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .admin-panel {
        padding: 20px;
    }
    
    .radio-options {
        flex-direction: column;
        gap: 10px;
    }
}

/* 编辑功能相关样式 */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.update-btn {
    background: linear-gradient(135deg, #3c8ce7 0%, #00eaff 100%);
    box-shadow: 0 4px 15px rgba(0, 234, 255, 0.2);
}

.update-btn::before {
    background: linear-gradient(135deg, #00eaff 0%, #3c8ce7 100%);
}

.update-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 234, 255, 0.3);
}

.cancel-btn {
    display: inline-block;
    padding: 12px 20px;
    background: linear-gradient(135deg, #a8a8a8 0%, #757575 100%);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    text-align: center;
}

.cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.edit-btn {
    display: inline-block;
    padding: 8px 12px;
    background: linear-gradient(135deg, #3c8ce7 0%, #00eaff 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    text-align: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-cell {
    display: flex;
    flex-direction: column;
}

.action-cell form {
    margin: 0;
}

.action-cell .delete-btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .update-btn, .cancel-btn {
        width: 100%;
    }
}

/* SEO优化相关样式 */
.intro-section {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.intro-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.intro-section h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.6rem;
    font-weight: 600;
}

.intro-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.categories-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.categories-section h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.category-tag {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f6f9fc 0%, #eef2f7 100%);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-tag:hover {
    transform: translateY(-2px);
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-articles {
    margin-top: 40px;
    margin-bottom: 40px;
}

.related-articles h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.article-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.article-card h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 600;
}

.article-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    color: #4a6cf7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #2541b2;
    text-decoration: underline;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: #4a6cf7;
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .category-tags {
        justify-content: flex-start;
    }
} 