/* 主题变量定义 */
:root {
    /* 夜间模式默认值 */
    --bg-primary: #000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111;
    --bg-hover: #1a1a1a;
    --bg-input: #1a1a1a;
    --text-primary: #fff;
    --text-secondary: #aaa;
    --text-muted: #888;
    --border-primary: #222;
    --border-secondary: #333;
    --accent-primary: #00ff88;
    --accent-hover: #00e67a;
    --shadow: rgba(0, 0, 0, 0.3);
    --danger: #ff6b6b;
    --danger-hover: #ff5252;
    --warning: #ffc107;
    --success: #4caf50;
}

[data-theme="light"] {
    --bg-primary: #fff;
    --bg-secondary: #f8f9fa;
    --bg-card: #fff;
    --bg-hover: #f1f3f4;
    --bg-input: #f8f9fa;
    --text-primary: #000;
    --text-secondary: #333;
    --text-muted: #666;
    --border-primary: #e1e5e9;
    --border-secondary: #d1d5db;
    --accent-primary: #0066cc;
    --accent-hover: #0052a3;
    --shadow: rgba(0, 0, 0, 0.1);
    --danger: #dc3545;
    --danger-hover: #c82333;
    --warning: #ffc107;
    --success: #28a745;
}

/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #449d44;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 12px 25px;
    font-size: 1rem;
}

/* 表单样式 */
.form-container {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid var(--border-primary);
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-hover);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* 主题切换按钮 */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: var(--text-primary);
}

/* 错误和成功消息 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: var(--danger);
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: var(--success);
}

/* 卡片样式 */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-primary);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--accent-primary);
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 25px;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-primary);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
    
    .grid-cols-2, .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 首页特定样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

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

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.nav-links a.active {
    color: var(--accent-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
}

.auth-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.hero {
    text-align: center;
    padding: 120px 0 80px;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
}

.features {
    padding: 100px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    border-bottom: 1px solid var(--border-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px 30px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-primary);
}

.feature-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--accent-primary);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature-desc {
    color: var(--text-muted);
    line-height: 1.7;
}

.preview {
    padding: 100px 0;
    text-align: center;
}

.preview-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--border-primary);
}

.preview-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.preview-desc {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.preview-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 500px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto;
}

.cta {
    padding: 100px 0;
    text-align: center;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
}

.cta h2 {
    font-size: 3rem;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.cta p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

.footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--accent-primary);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    padding-top: 30px;
    border-top: 1px solid var(--border-primary);
    font-size: 0.9rem;
}

.beian-info {
    text-align: center;
    padding: 20px 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-primary);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.beian-info a {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.beian-info a:hover {
    color: var(--accent-primary);
}

.beian-info img {
    height: 20px;
    vertical-align: middle;
}

.beian-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
}

/* 仪表板特定样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-primary);
    margin-bottom: 40px;
    text-align: center;
    transition: all 0.3s ease;
}

.profile-card:hover {
    border-color: var(--accent-primary);
}

.profile-avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
}

.profile-avatar-fallback {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    border: 3px solid var(--accent-primary);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.profile-bio {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.profile-link {
    background: var(--bg-hover);
    padding: 15px;
    border-radius: 12px;
    font-family: monospace;
    word-break: break-all;
    margin-bottom: 20px;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-secondary);
}

.copy-btn {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.copy-btn:hover {
    background: var(--accent-hover);
}

.copy-btn.copied {
    background: var(--success);
}

.links-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.links-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.link-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--border-primary);
    transition: all 0.3s ease;
}

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

.link-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent-primary);
}

.link-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.link-url {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    word-break: break-all;
}

.link-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.edit-btn {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}

.edit-btn:hover {
    background: var(--bg-input);
}

.delete-btn {
    background: rgba(255, 107, 107, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.delete-btn:hover {
    background: rgba(255, 107, 107, 0.2);
}

/* 统计页面特定样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-primary);
    text-align: center;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
}

.chart-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-primary);
    margin-bottom: 40px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-container {
    height: 300px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 20px 0;
    position: relative;
}

.chart-bar {
    flex: 1;
    background: var(--accent-primary);
    border-radius: 5px 5px 0 0;
    min-width: 30px;
    position: relative;
    transition: height 0.5s ease;
}

.chart-bar-label {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.chart-bar-value {
    position: absolute;
    top: -25px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 600;
}

.links-stats {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-primary);
}

.links-stats-header {
    margin-bottom: 30px;
}

.links-stats-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.links-table {
    width: 100%;
    border-collapse: collapse;
}

.links-table th {
    text-align: left;
    padding: 15px;
    border-bottom: 1px solid var(--border-secondary);
    color: var(--text-muted);
    font-weight: 500;
}

.links-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-primary);
}

.link-title-cell {
    font-weight: 500;
    color: var(--text-primary);
}

.link-url-cell {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.clicks-cell {
    text-align: center;
    font-weight: 600;
    color: var(--accent-primary);
}

.device-stats {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-primary);
    margin-top: 40px;
}

.device-stats-header {
    margin-bottom: 30px;
}

.device-stats-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.device-card {
    background: var(--bg-hover);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-secondary);
}

.device-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent-primary);
}

.device-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.device-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* 设置页面特定样式 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.setting-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-primary);
}

.setting-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-title svg {
    width: 24px;
    height: 24px;
    fill: var(--accent-primary);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-secondary);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.background-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.background-option {
    height: 60px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.background-option:hover {
    transform: scale(1.05);
}

.background-option.selected {
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

/* 编辑资料页面特定样式 */
.avatar-upload {
    text-align: center;
    margin-bottom: 30px;
}

.avatar-preview {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.avatar-preview img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
}

.avatar-preview .avatar-fallback {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    border: 3px solid var(--accent-primary);
}

.upload-btn {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: var(--bg-input);
    border-color: var(--accent-primary);
}

.file-input {
    display: none;
}

/* 添加/编辑链接页面特定样式 */
.icon-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.icon-option {
    background: var(--bg-hover);
    border: 2px solid var(--border-secondary);
    border-radius: 12px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.icon-option:hover {
    border-color: var(--accent-primary);
    background: var(--bg-input);
}

.icon-option.selected {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
    transform: scale(1.05);
}

.icon-input {
    margin-top: 15px;
    display: none;
}

.icon-preview {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-top: 10px;
    border: 1px solid var(--border-secondary);
}

.custom-icon-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-primary);
}

.custom-icon-toggle {
    color: var(--accent-primary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 0;
}

.custom-icon-toggle:hover {
    text-decoration: underline;
}

/* 个人页面特定样式 */
body[data-page="profile"] {
    <?php 
    // 根据用户选择的背景样式设置背景
    $background_styles = [
        'gradient1' => 'background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);',
        'gradient2' => 'background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);',
        'gradient3' => 'background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);',
        'gradient4' => 'background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);',
        'gradient5' => 'background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);',
        'black' => 'background-color: #000;',
        'dark' => 'background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);',
        'purple' => 'background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);',
        'blue' => 'background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);',
        'green' => 'background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);'
    ];
    // 这里需要在PHP中动态设置
    ?>
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.user-profile {
    text-align: center;
    padding: 60px 0 40px;
}

.links-section {
    padding: 20px 0 60px;
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.link-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
    display: block;
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.link-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.link-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.link-info {
    flex: 1;
    text-align: left;
}

.profile-footer {
    text-align: center;
    padding: 30px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-footer a {
    color: #00ff88;
    text-decoration: none;
}

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

/* 媒体查询 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .user-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .icon-selector {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .background-preview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .device-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .auth-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .icon-selector {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .link-content {
        gap: 12px;
    }
    
    .link-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}
