/**
 * Home Page Styles
 * 首页专用样式
 */

/* 1. Header: Glassmorphism & Minimal */
.home-navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 100;
}

[data-theme="dark"] .home-navbar {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.home-nav-actions a {
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.2s;
}

.home-nav-actions a.btn-login {
    background: var(--text-primary);
    color: var(--text-inverse);
    padding: 6px 14px;
    border-radius: 99px;
    transition: transform 0.2s var(--ease-apple), opacity 0.2s;
}

.home-nav-actions a.btn-login:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Theme Toggle Button */
.theme-toggle-home {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.theme-toggle-home:hover {
    color: var(--text-primary);
}

/* 2. Main Hero: Centered & Focused */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s var(--ease-apple) forwards;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s var(--ease-apple) 0.1s forwards;
}

/* 3. The Interactive Card */
.workspace-card {
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    padding: 8px;
    width: 100%;
    max-width: 640px;
    opacity: 0;
    transform: scale(0.95);
    animation: scaleIn 0.8s var(--spring) 0.2s forwards;
    position: relative;
    overflow: hidden;
}

/* Segmented Control */
.segment-control {
    background: var(--bg-input);
    border-radius: 18px;
    padding: 4px;
    display: flex;
    position: relative;
    margin-bottom: 24px;
}

/* The sliding background */
.segment-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--bg-card);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s var(--ease-apple);
    pointer-events: none;
}

.segment-btn {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s;
    user-select: none;
}

.segment-btn.active {
    color: var(--text-primary);
}

.card-body {
    padding: 0 24px 24px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.icon-prefix {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

.main-input {
    width: 100%;
    height: 56px;
    padding: 0 16px 0 48px;
    font-size: 1.1rem;
    border: 2px solid transparent;
    background: var(--bg-input);
    border-radius: 16px;
    outline: none;
    color: var(--text-primary);
    transition: all 0.2s var(--ease-apple);
}

.main-input:focus {
    background: var(--bg-card);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.action-btn {
    position: absolute;
    right: 8px;
    height: 40px;
    padding: 0 20px;
    background: var(--text-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.action-btn:active {
    transform: scale(0.95);
}
 

/* Result Panel */
.result-panel {
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s var(--ease-apple);
}

.result-panel.visible {
    margin-top: 24px;
    max-height: 200px;
    opacity: 1;
}

.result-card {
    background: var(--accent-light);
    border: 1px solid rgba(0, 113, 227, 0.1);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.result-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 16px;
}

.copy-btn {
    background: var(--bg-hover);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.2s;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: var(--bg-input);
}

/* Footer */
.home-footer {
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

.footer-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: left;
}

.footer-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-copyright {
    margin-top: 40px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Mobile Optimization */
@media (max-width: 600px) {
    .hero-title {
        font-size: 2rem;
    }

    .workspace-card {
        box-shadow: none;
        border: 1px solid var(--border);
    }

    .footer-grid {
        text-align: center;
    }
}

/* Dark Mode Overrides */
[data-theme="dark"] .workspace-card {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

[data-theme="dark"] .segment-btn:hover {
    color: var(--text-primary);
}

[data-theme="dark"] .btn-shorten:hover {
    background: var(--bg-hover);
}