/**
 * Zorotan Theme - Download Page Styles
 * 
 * Download page specific styles
 * Inspired by modern music download sites
 * 
 * @package Zorotan
 * @version 2.0.0
 */

/* ========================================
   1. PAGE LAYOUT
   ======================================== */

.download-content {
    max-width: 1200px;
    margin: 0 auto;
}

.page-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 16px;
    margin-top: calc(var(--spacing-unit) * 1);
}

/* ========================================
   1.5 CONTENT HEADER (追加)
   ======================================== */

.content-header {
    margin-top: 20px;
    margin-bottom: calc(var(--spacing-unit) * 6);
    text-align: center;
}

.page-title {
    font-size: 32px;
    font-weight: normal;
    letter-spacing: 0.1em;
}

/* ==

/* ========================================
   2. DOWNLOAD NOTICE
   ======================================== */

.download-notice {
    background: var(--bg-gray);
    padding: calc(var(--spacing-unit) * 4);
    border-radius: 8px;
    margin-bottom: calc(var(--spacing-unit) * 6);
    text-align: center;
}

.download-notice h3 {
    font-size: 18px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--primary-color);
    font-weight: 500;
}

.download-notice p {
    margin: calc(var(--spacing-unit) * 1) 0;
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
}

/* ========================================
   3. DOWNLOAD SECTIONS
   ======================================== */

.download-section {
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.download-section .section-title {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: calc(var(--spacing-unit) * 4);
    padding-bottom: calc(var(--spacing-unit) * 2);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1.5);
    color: var(--primary-color);
}

.section-icon {
    font-size: 28px;
    line-height: 1;
}

/* ========================================
   4. MUSIC DOWNLOAD LIST
   ======================================== */

.download-list {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
}

.download-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: calc(var(--spacing-unit) * 3);
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 3);
    transition: all 0.3s ease;
    position: relative;
}

.download-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

/* Item Number */
.item-number {
    font-size: 28px;
    font-weight: 300;
    color: var(--text-light);
    min-width: 45px;
    text-align: center;
}

/* Item Info */
.item-info {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: calc(var(--spacing-unit) * 1);
    color: var(--primary-color);
    line-height: 1.4;
}

.item-meta {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    font-size: 13px;
    color: var(--text-gray);
    flex-wrap: wrap;
}

.meta-item {
    position: relative;
}

.meta-item:not(:first-child)::before {
    content: '•';
    position: absolute;
    left: calc(var(--spacing-unit) * -1.25);
    color: var(--text-light);
}

/* Download Buttons Container */
.item-downloads {
    display: flex;
    gap: calc(var(--spacing-unit) * 1.5);
    flex-shrink: 0;
}

/* ========================================
   5. DOWNLOAD BUTTONS
   ======================================== */

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    min-width: 90px;
    transition: all 0.3s ease;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Button Icon */
.btn-icon {
    font-size: 24px;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    line-height: 1;
}

/* Button Label */
.btn-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

/* Button Size */
.btn-size {
    font-size: 11px;
    color: var(--text-gray);
}

/* Specific Button Styles */
.inst-btn {
    color: #FF6B6B;
    border-color: #FFE0E0;
    background: #FFF5F5;
}

.inst-btn:hover {
    background: #FF6B6B;
    color: var(--white);
    border-color: #FF6B6B;
}

.inst-btn:hover .btn-size {
    color: rgba(255, 255, 255, 0.8);
}

.lyrics-btn {
    color: #4ECDC4;
    border-color: #D0F0EE;
    background: #F0FFFE;
}

.lyrics-btn:hover {
    background: #4ECDC4;
    color: var(--white);
    border-color: #4ECDC4;
}

.lyrics-btn:hover .btn-size {
    color: rgba(255, 255, 255, 0.8);
}

.mv-btn {
    color: #6C5CE7;
    border-color: #E0DCFC;
    background: #F5F3FF;
}

.mv-btn:hover {
    background: #6C5CE7;
    color: var(--white);
    border-color: #6C5CE7;
}

.mv-btn:hover .btn-size {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   6. WALLPAPER SECTION
   ======================================== */

.wallpaper-section {
    margin-top: calc(var(--spacing-unit) * 10);
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: calc(var(--spacing-unit) * 3);
}

.wallpaper-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wallpaper-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.wallpaper-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-gray);
    position: relative;
    overflow: hidden;
}

/* サムネイル画像のスタイル追加 */
.wallpaper-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* 画像を切り抜いて表示 */
    object-position: center;  /* 中央寄せ */
    display: block;
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--text-gray) 100%);
    color: var(--white);
    font-size: 48px;
}

.wallpaper-info {
    padding: calc(var(--spacing-unit) * 3);
}

.wallpaper-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    color: var(--primary-color);
}

.wallpaper-type {
    display: inline-block;
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: calc(var(--spacing-unit) * 2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resolution-links {
    display: flex;
    gap: calc(var(--spacing-unit) * 1);
    flex-wrap: wrap;
}

.resolution-btn {
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.5);
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.resolution-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* ========================================
   7. TERMS OF USE
   ======================================== */

.download-terms {
    background: #FFF3E0;
    padding: calc(var(--spacing-unit) * 4);
    border-radius: 8px;
    margin-top: calc(var(--spacing-unit) * 8);
    border: 1px solid #FFE0B2;
}

.download-terms h3 {
    font-size: 18px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: #F57C00;
    font-weight: 500;
}

.download-terms ul {
    list-style: none;
    padding: 0;
}

.download-terms li {
    padding: calc(var(--spacing-unit) * 1) 0;
    padding-left: calc(var(--spacing-unit) * 3);
    position: relative;
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
}

.download-terms li::before {
    content: '•';
    position: absolute;
    left: calc(var(--spacing-unit) * 1);
    color: #F57C00;
    font-weight: bold;
}

/* ========================================
   8. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 968px) {
    .download-item {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 2);
        text-align: center;
    }
    
    .item-number {
        margin-bottom: calc(var(--spacing-unit) * 1);
    }
    
    .item-meta {
        justify-content: center;
    }
    
    .item-downloads {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .download-btn {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .download-notice {
        padding: calc(var(--spacing-unit) * 3);
    }
    
    .download-section .section-title {
        font-size: 20px;
    }
    
    .section-icon {
        font-size: 24px;
    }
    
    .wallpaper-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .download-content {
        padding: 0 calc(var(--spacing-unit) * 1);
    }
    
    .download-item {
        padding: calc(var(--spacing-unit) * 2);
    }
    
    .item-title {
        font-size: 16px;
    }
    
    .item-meta {
        font-size: 12px;
        gap: calc(var(--spacing-unit) * 1.5);
    }
    
    .download-btn {
        min-width: 80px;
        padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 1);
    }
    
    .btn-icon {
        font-size: 20px;
    }
    
    .btn-label {
        font-size: 11px;
    }
    
    .btn-size {
        font-size: 10px;
    }
    
    .download-terms {
        padding: calc(var(--spacing-unit) * 3);
    }
}

/* ========================================
   9. ANIMATIONS
   ======================================== */

@keyframes downloadPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.download-btn:active {
    animation: downloadPulse 0.3s ease;
}

/* Loading state */
.download-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.download-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ========================================
   10. ACCESSIBILITY
   ======================================== */

.download-btn:focus,
.resolution-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .download-item {
        border-width: 2px;
    }
    
    .download-btn,
    .resolution-btn {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .download-item,
    .download-btn,
    .resolution-btn {
        transition: none;
    }
    
    .download-item:hover,
    .download-btn:hover {
        transform: none;
    }
    
    .download-btn:active {
        animation: none;
    }
}