/**
 * FanzaTik Grid View Styles (一覧表示スタイル)
 * シングルページのおすすめセクションと同じ美しいグリッドレイアウト
 *
 * @version 3.2.0
 */

/* =================================================================
   Grid View Page Layout
   ================================================================= */
.grid-view-page {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
}

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

/* =================================================================
   Page Header
   ================================================================= */
.grid-view-header {
    text-align: center;
    margin-bottom: 40px;
}

.grid-view-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.grid-view-title i {
    font-size: 28px;
}

.grid-view-subtitle {
    font-size: 16px;
    color: var(--text-color-muted);
    margin: 0;
}

/* =================================================================
   Search and Filter Controls
   ================================================================= */
.grid-view-controls {
    margin-bottom: 30px;
}

.search-section {
    margin-bottom: 20px;
}

.grid-search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--surface-color);
    border: 1px solid var(--header-border);
    border-radius: 25px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary-color);
}

.grid-search-input {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 16px;
    outline: none;
}

.grid-search-input::placeholder {
    color: var(--text-color-muted);
}

.grid-search-btn {
    padding: 15px 20px;
    background-color: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.grid-search-btn:hover {
    background-color: var(--primary-hover);
}

.grid-search-clear {
    padding: 15px;
    background: transparent;
    border: none;
    color: var(--text-color-muted);
    cursor: pointer;
}

/* =================================================================
   Filter Tabs
   ================================================================= */
.grid-view-filters {
    text-align: center;
}

.filter-tabs {
    display: inline-flex;
    gap: 10px;
    background-color: var(--surface-color);
    border-radius: 25px;
    padding: 5px;
    border: 1px solid var(--header-border);
}

.filter-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--text-color-muted);
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.filter-tab.active {
    background-color: var(--primary-color);
    color: white;
}

/* =================================================================
   Search Info
   ================================================================= */
.grid-search-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 20px;
    background-color: var(--surface-color);
    border-radius: 10px;
    border: 1px solid var(--header-border);
}

.search-results-text {
    margin: 0;
    color: var(--text-color);
    font-weight: 500;
}

.clear-search-btn {
    padding: 8px 16px;
    background-color: var(--primary-color);
    border: none;
    color: white;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.clear-search-btn:hover {
    background-color: var(--primary-hover);
}

/* =================================================================
   Videos Grid - シングルページのおすすめセクションと同じスタイル
   ================================================================= */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.video-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--header-border);
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.video-info {
    padding: 12px;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 8px 0;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text-color);
}

.actress {
    font-size: 12px;
    color: var(--primary-color);
    margin-bottom: 4px;
    font-weight: 600;
}

.like-count {
    font-size: 12px;
    color: var(--text-color-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.like-count i {
    color: #ff4757;
}

/* =================================================================
   Loading and Error States
   ================================================================= */
.grid-loading-container {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--header-border);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-color-muted);
    font-size: 16px;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #ff4757;
    font-size: 16px;
    background-color: var(--surface-color);
    border-radius: 10px;
    border: 1px solid #ff4757;
}

/* =================================================================
   No Results
   ================================================================= */
.grid-no-results {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--surface-color);
    border-radius: 15px;
    border: 1px solid var(--header-border);
}

.no-results-icon {
    font-size: 48px;
    color: var(--text-color-muted);
    margin-bottom: 20px;
}

.grid-no-results h3 {
    font-size: 20px;
    color: var(--text-color);
    margin: 0 0 10px 0;
}

.grid-no-results p {
    color: var(--text-color-muted);
    margin: 0;
}

/* =================================================================
   Responsive Design
   ================================================================= */
@media (max-width: 768px) {
    .grid-view-container {
        padding: 15px;
    }
    
    .grid-view-title {
        font-size: 24px;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .filter-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .grid-search-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .grid-view-title {
        font-size: 20px;
        flex-direction: column;
        gap: 8px;
    }
    
    .search-input-wrapper {
        border-radius: 15px;
    }
    
    .grid-search-input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .grid-search-btn {
        padding: 12px 15px;
    }
}

/* =================================================================
   マーキー非表示（一覧ページでは表示しない）
   ================================================================= */
.grid-view-page .marquee-container {
    display: none !important;
}

.grid-view-page .fzt-marquee {
    display: none !important;
}

