:root {
    --bg-primary: #080c15;
    --bg-secondary: #0f1520;
    --bg-card: #171f2e;
    --accent-primary: #3b82f6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;
    --accent-info: #3b82f6;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #1e293b;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #050810 0%, #0a1128 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 68px 20px 20px;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

.subpage-container {
    max-width: 1000px;
    margin: 0 auto;
}

.subpage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

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

.back-btn {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.back-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

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

.website-card {
    position: relative;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.website-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #a855f7, #ec4899, #f97316);
    border-radius: 16px 16px 0 0;
}

.website-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 20px 40px -12px rgba(168, 85, 247, 0.3);
}

.website-icon {
    font-size: 3rem;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.website-card:hover .website-icon {
    transform: scale(1.1) rotate(-3deg);
}

.website-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.website-card p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.7;
    min-height: 3rem;
}

.website-link {
    display: inline-block;
    margin-top: auto;
    padding: 12px 24px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.website-link:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
    filter: brightness(1.1);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-details p {
    color: var(--text-secondary);
    margin: 0;
}

.contact-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.about-content {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    body {
        padding: 72px 12px 12px;
    }

    .websites-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .website-card {
        padding: 22px 18px;
        border-radius: 12px;
    }

    .website-icon {
        font-size: 2.5rem;
    }

    .website-card h3 {
        font-size: 1.2rem;
    }

    .website-card p {
        font-size: 0.9rem;
        min-height: auto;
    }

    .website-link {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .subpage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-title {
        font-size: 1.25rem;
    }
}

/* 设置面板样式 */
.settings-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-overlay.active {
    display: block;
    opacity: 1;
}

.settings-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-right: none;
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.settings-panel.active {
    right: 0;
}

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

.settings-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.settings-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.settings-body::-webkit-scrollbar {
    width: 6px;
}

.settings-body::-webkit-scrollbar-track {
    background: transparent;
}

.settings-body::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}

.settings-body::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

.settings-item-group {
    margin-bottom: 24px;
}

.settings-item-group:last-child {
    margin-bottom: 0;
}

.settings-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-left: 4px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: border-color 0.2s ease;
}

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

.settings-item-label {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.settings-item-value {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 开关样式 */
.settings-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

.settings-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-muted);
    transition: 0.3s ease;
    border-radius: 26px;
}

.settings-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

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

.settings-switch:active + .settings-switch-slider:before {
    width: 24px;
}

/* 下拉选择样式 */
.settings-select {
    padding: 8px 32px 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    transition: border-color 0.2s ease;
}

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

.settings-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.settings-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* 操作按钮样式 */
.settings-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-action-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.settings-action-btn:active {
    transform: translateY(0);
}

.settings-action-btn svg {
    flex-shrink: 0;
}

.settings-action-danger {
    background: var(--accent-error);
}

.settings-action-danger:hover {
    background: #dc2626;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .settings-panel {
        width: 100%;
        right: -100%;
    }

    .settings-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .settings-item-label {
        flex: 1;
    }

    .settings-switch {
        flex-shrink: 0;
    }

    .settings-select {
        flex-shrink: 0;
        min-width: 100px;
    }

    .settings-action-btn {
        flex-shrink: 0;
    }
}

/* 通知容器样式 */
#notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 280px;
    max-width: 400px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    animation: notificationSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    backdrop-filter: blur(10px);
}

.notification.success {
    border-left: 3px solid var(--accent-success);
}

.notification.error {
    border-left: 3px solid var(--accent-error);
}

.notification.info {
    border-left: 3px solid var(--accent-info);
}

.notification.warning {
    border-left: 3px solid var(--accent-warning);
}

.notification-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-right: 12px;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 导航按钮样式 */
.settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.settings-btn svg {
    flex-shrink: 0;
}

/* 动画开关控制 */
body[data-animations="false"] *,
body[data-animations="false"] *::before,
body[data-animations="false"] *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
}
