/* ==========================================
   MangaStudio - Home Page
   Apple Minimalist Design System
   ========================================== */

/* Home Header */
.home-header {
    padding: 48px 24px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.home-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.home-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    min-width: 0;
}

.home-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.home-title {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.home-search-toggle {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.home-search-toggle:hover {
    color: var(--text-primary);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.home-search-toggle.is-active {
    color: var(--accent);
    border-color: rgba(0, 113, 227, 0.2);
    background: var(--bg-primary);
}

.home-search {
    flex: 0 1 0;
    max-width: 0;
    width: 0;
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
    transition: max-width 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
    overflow: hidden;
}

.home-search.is-open {
    flex-basis: 320px;
    max-width: 320px;
    width: 320px;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.home-search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 8px 12px;
    box-shadow: var(--shadow-sm);
}


.home-search-icon {
    display: flex;
    align-items: center;
    color: var(--text-tertiary);
}

.home-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.home-search-input::placeholder {
    color: var(--text-tertiary);
}

.home-search-clear {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.home-search.has-value .home-search-clear {
    opacity: 1;
    pointer-events: auto;
}

.home-search-clear:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

/* Projects Section */
.projects-section {
    padding: 0 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
    min-height: 400px;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.empty-state-icon svg {
    color: var(--text-tertiary);
}

.empty-state-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-description {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 400px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-sm);
}

.search-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.search-empty-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Section Header (legacy support) */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .home-header {
        padding: 32px 16px 24px;
    }

    .home-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .home-header-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .home-title-group {
        width: 100%;
        justify-content: space-between;
    }

    .home-title {
        font-size: 28px;
    }

    .home-search.is-open {
        flex-basis: 100%;
        width: 100%;
        max-width: 100%;
    }

    .projects-section {
        padding: 0 16px 60px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .empty-state {
        padding: 48px 16px;
        min-height: 300px;
    }

    .empty-state-title {
        font-size: 20px;
    }

    .empty-state-description {
        font-size: 14px;
    }
}
