/* Program Guide Public Page Styles */

.program-guide-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.program-guide-title {
    color: #1d2327;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #2271b1;
    padding-bottom: 15px;
}

/* グリッドレイアウト */
.program-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* サムネイル専用レイアウト */
.program-guide-thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.program-guide-thumbnail-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.program-guide-thumbnail-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.thumbnail-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.thumbnail-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fff;
}

.thumbnail-label {
    padding: 20px 15px 15px;
    text-align: center;
}

.thumbnail-date {
    font-size: 1.1rem;
    font-weight: 600;
}

.program-guide-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

/* サムネイル表示 */
.program-guide-thumbnail {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.thumbnail-loading {
    color: #646970;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.thumbnail-loading.error {
    color: #d63638;
}

.thumbnail-canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.thumbnail-placeholder.loaded {
    background: #fff;
}

.thumbnail-placeholder.loaded .thumbnail-canvas {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.program-guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #2271b1;
}

.program-guide-card-header {
    background: linear-gradient(135deg, #2271b1, #72aee6);
    color: white;
    padding: 20px;
    text-align: center;
}

.program-guide-card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.program-guide-card-body {
    padding: 20px;
}

.program-guide-card-body .filename {
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 10px;
    font-size: 1.1rem;
    word-break: break-all;
}

.program-guide-card-body .file-size,
.program-guide-card-body .upload-date {
    color: #646970;
    margin: 8px 0;
    font-size: 0.9rem;
}

.program-guide-button {
    display: inline-block;
    background: #2271b1;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 15px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.program-guide-button:hover {
    background: #135e96;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

/* テーブルレイアウト */
.program-guide-table {
    margin-top: 20px;
    overflow-x: auto;
}

.program-guide-table-content {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.program-guide-table-content thead {
    background: linear-gradient(135deg, #2271b1, #72aee6);
    color: white;
}

.program-guide-table-content th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
}

.program-guide-table-content td {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.program-guide-table-content tbody tr {
    transition: background-color 0.3s ease;
}

.program-guide-table-content tbody tr:hover {
    background-color: #f8f9fa;
}

.program-guide-table-content tbody tr:last-child td {
    border-bottom: none;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .program-guide-container {
        padding: 15px;
    }
    
    .program-guide-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .program-guide-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .program-guide-card-header {
        padding: 15px;
    }
    
    .program-guide-card-header h3 {
        font-size: 1.3rem;
    }
    
    .program-guide-card-body {
        padding: 15px;
    }
    
    .program-guide-thumbnail {
        height: 150px;
    }
    
    /* サムネイル専用レイアウトのレスポンシブ */
    .program-guide-thumbnail-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 400px;
    }
    
    .program-guide-thumbnail-item {
        aspect-ratio: 4/3;
    }
    
    .thumbnail-date {
        font-size: 1rem;
    }
    
    .program-guide-table-content th,
    .program-guide-table-content td {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .program-guide-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .program-guide-container {
        padding: 10px;
    }
    
    .program-guide-title {
        font-size: 1.3rem;
    }
    
    .program-guide-table-content {
        font-size: 0.8rem;
    }
    
    .program-guide-table-content th,
    .program-guide-table-content td {
        padding: 8px 10px;
    }
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.program-guide-card {
    animation: fadeInUp 0.6s ease-out;
}

.program-guide-card:nth-child(1) { animation-delay: 0.1s; }
.program-guide-card:nth-child(2) { animation-delay: 0.2s; }
.program-guide-card:nth-child(3) { animation-delay: 0.3s; }
.program-guide-card:nth-child(4) { animation-delay: 0.4s; }
.program-guide-card:nth-child(5) { animation-delay: 0.5s; }
.program-guide-card:nth-child(6) { animation-delay: 0.6s; }

/* ローディング状態 */
.program-guide-loading {
    text-align: center;
    padding: 40px;
    color: #646970;
}

.program-guide-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #2271b1;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 空の状態 */
.program-guide-empty {
    text-align: center;
    padding: 60px 20px;
    color: #646970;
}

.program-guide-empty h3 {
    color: #1d2327;
    margin-bottom: 10px;
}

.program-guide-empty p {
    margin: 0;
    font-size: 1.1rem;
}
