/* JAVSubs — Subtitle Library & Detail Pages */

/* ============ */
/*  Breadcrumb  */
/* ============ */
.breadcrumb {
    padding: 100px 0 16px;
    font-size: 0.85rem;
    color: var(--text-dim);
}
.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--primary);
}

/* ============ */
/* Title Page   */
/* ============ */
.subtitle-page {
    padding-bottom: 80px;
}

.subtitle-header {
    margin-bottom: 32px;
}

.subtitle-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.subtitle-title {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 600px;
}

.subtitle-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 768px) {
    .subtitle-layout {
        grid-template-columns: 1fr;
    }
}

/* Download Card */
.download-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.download-card h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-btn {
    text-align: center;
    width: 100%;
}

.download-note {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
}

/* Preview */
.preview-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.preview-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.srt-preview {
    position: relative;
    max-height: 400px;
    overflow: hidden;
}

.preview-line {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.preview-line:last-child {
    border-bottom: none;
}

.line-num {
    color: var(--text-dim);
    font-size: 0.75rem;
    min-width: 24px;
    text-align: right;
    padding-top: 2px;
    font-family: monospace;
}

.line-text {
    color: var(--text);
}

.preview-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, var(--bg-card));
    pointer-events: none;
}

/* How to use */
.howto-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.howto-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.howto-section ol {
    padding-left: 20px;
    color: var(--text-muted);
    line-height: 1.8;
}

.howto-section code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary);
}

.howto-tip {
    margin-top: 12px;
    padding: 12px;
    background: var(--primary-glow);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Sidebar */
.subtitle-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.meta-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.meta-card h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text);
}

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

.meta-table td {
    padding: 6px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.meta-table td:first-child {
    color: var(--text-dim);
    width: 100px;
}

.meta-table td:last-child {
    color: var(--text);
}

.meta-table tr:last-child td {
    border-bottom: none;
}

.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.genre-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* CTA Card */
.cta-card {
    background: var(--gradient-card);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.cta-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.cta-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.cta-small {
    font-size: 0.75rem !important;
    color: var(--text-dim) !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

/* ============ */
/* Library Page */
/* ============ */
.subtitle-library {
    padding: 120px 0 80px;
}

.library-header {
    text-align: center;
    margin-bottom: 40px;
}

.library-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.library-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 20px;
}

.library-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.library-stats .stat {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.library-stats strong {
    color: var(--primary);
}

/* Search */
.search-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto 32px;
}

.search-bar input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-bar input::placeholder {
    color: var(--text-dim);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    pointer-events: none;
}

.results-count {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 16px;
    min-height: 20px;
}

/* Subtitle Grid */
.subtitle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.subtitle-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.subtitle-card:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-code {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.card-actress {
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-studio {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--text-dim);
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

/* No results */
.no-results {
    text-align: center;
    padding: 48px 0;
    color: var(--text-muted);
}

.no-results a {
    color: var(--primary);
}

.no-results.hidden {
    display: none;
}

/* Library CTA */
.library-cta {
    text-align: center;
    padding: 48px;
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.library-cta h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.library-cta p {
    color: var(--text-muted);
    margin-bottom: 20px;
}
