/* リセットCSS */
* {margin: 0;padding: 0;box-sizing: border-box;}

/* 基本設定 */
html{font-size:13px;line-height: 1.6;font-family: "Inter var", "Noto Sans JP", sans-serif;}
body {color: #333;background: linear-gradient(135deg, #ffffea 0%, #ffbb99 100%);min-height: 100vh;}
.all-wrap{display: flex;flex-direction: column;justify-content: space-between;width:100%;min-height: 100vh;}

/* ヘッダー */
header {display: flex;flex-direction: column; align-items: center;justify-content: center; padding: 2rem 1rem;background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);border-bottom: 1px solid rgba(255, 255, 255, 0.2);}
header h1 {display: flex;flex-direction: column; align-items: center;justify-content: center; margin-bottom: 1rem;}
header .logo{width:100%;max-width:300px;}
header .logo_wa{width:100%;max-width:160px;}
header .logo img{width:100%;}
header p {color: #000;font-size: 1.1rem;}

/* メインコンテンツ */
main {width:100%;max-width: 1200px;margin: 0 auto;padding: 3rem 1rem 5rem;}

/* フッター */
footer {width:100%;margin: 0 auto;padding: 1rem;background:#eeaa00;}
footer .copyright{font-size:0.8rem;}
footer .notice{font-size:10px;}

.not_found{display: flex;align-items: center;justify-content: center; width:100%;}
.not_found_text{display: flex;align-items: center;justify-content: center; width:300px;height:200px;border:5px solid #000;font-weight: 600;font-size:24px;}

.btn-color{background: linear-gradient(45deg, #ff667e, #eeaa00);color: white;}
.btn-color:hover{box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);}

/* フィルターセクション */
.filter-section {margin-bottom: 2rem;}
.filter-section h2 {color: white;margin-bottom: 1rem;font-size: 1.3rem;}
.filter-buttons {display: flex;gap: 0.5rem;flex-wrap: wrap;}
.filter-btn {background: rgba(255, 255, 255, 0.2);color: white;border: 1px solid rgba(255, 255, 255, 0.3);padding: 0.7rem 1.5rem;border-radius: 25px;
    cursor: pointer;transition: all 0.3s ease;font-size: 0.9rem;backdrop-filter: blur(10px);}
.filter-btn:hover {background: rgba(255, 255, 255, 0.3);transform: translateY(-2px);}
.filter-btn.active {background: white;color: #667eea;font-weight: bold;}

/* 壁紙グリッド */
.wallpaper-grid {display: grid;grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));gap: 1.5rem;}
.wallpaper-item {position: relative;border-radius: 15px;overflow: hidden;box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);transition: all 0.3s ease;cursor: pointer;background: white;}
.wallpaper-item:hover {transform: translateY(-10px);box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);}
.wallpaper-item img {width: 100%;height: 400px;object-fit: cover;display: block;}
.wallpaper-overlay {position: absolute;bottom: 0;left: 0;right: 0;background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;padding: 2rem 1rem 1rem;transform: translateY(100%);transition: all 0.3s ease;}
.wallpaper-item:hover .wallpaper-overlay {transform: translateY(0);}
.wallpaper-overlay h3 {font-size: 1.2rem;margin-bottom: 0.5rem;}
.wallpaper-overlay p {font-size: 0.9rem;margin-bottom: 1rem;opacity: 0.9;}
.preview-btn {border: none;padding: 0.7rem 1.5rem;
    border-radius: 25px;cursor: pointer;font-size: 0.9rem;transition: all 0.3s ease;}
.preview-btn:hover {transform: scale(1.05);}

/* モーダル */
.modal {display: none;position: fixed;z-index: 1000;left: 0;top: 0;width: 100%;height: 100%;background-color: rgba(0, 0, 0, 0.8);backdrop-filter: blur(5px);}
.modal.show {display: flex;align-items: center;justify-content: center;animation: fadeIn 0.3s ease;}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {background: white;border-radius: 20px;max-width: 90vw;max-height: 90vh;overflow-y: auto;position: relative;animation: slideUp 0.3s ease;box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {position: absolute;right: 20px;top: 20px;font-size: 2rem;cursor: pointer;color: white;background: rgba(0, 0, 0, 0.5);width: 40px;height: 40px;
    border-radius: 50%;display: flex;align-items: center;justify-content: center;z-index: 1;transition: all 0.3s ease;}
.close-btn:hover {background: rgba(0, 0, 0, 0.7);transform: scale(1.1);}
#modalImage {width: 100%;max-width: 400px;height: auto;border-radius: 20px 20px 0 0;}
.modal-info {padding: 2rem;}
.modal-info h3 {font-size: 1.5rem;margin-bottom: 1rem;color: #333;}
.modal-info p {color: #666;margin-bottom: 2rem;line-height: 1.6;}
.download-btn {border: none;padding: 1rem 2rem;border-radius: 50px;cursor: pointer;
    font-size: 1rem;font-weight: bold;transition: all 0.3s ease;width: 100%;}
.download-btn:hover {transform: translateY(-2px);}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    header h1 {font-size: 2rem;}
    .wallpaper-grid {grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));gap: 1rem;}
    .wallpaper-item img {height: 250px;}
    .filter-buttons {justify-content: center;}
    .modal-content {margin: 1rem;max-width: calc(100vw - 2rem);}
    .modal-info {padding: 1rem;}
    #modalImage {max-width: 100%;}
}

@media (max-width: 480px) {
    header {padding: 1.5rem 1rem;}
    header h1 {font-size: 1.8rem;}
    .wallpaper-grid {grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));}
    .wallpaper-item img {height: 200px;}
    .filter-btn {padding: 0.5rem 1rem;font-size: 0.8rem;}
    .wallpaper-overlay {padding: 1rem 0.5rem 0.5rem;}
    .wallpaper-overlay h3 {font-size: 1rem;}
    .wallpaper-overlay p {font-size: 0.8rem;}
}