/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #0a0a0a;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 绛紫色系 */
:root {
    --primary-crimson: #8C2F4D;
    --deep-wine: #6D2138;
    --light-crimson: #B84D6F;
    --accent-gold: #C9A96E;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --card-hover: #252525;
}

/* 顶部导航栏 */
.header {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #2a2a2a;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-gold);
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 2px 10px rgba(201, 169, 110, 0.3);
}

.logo:hover {
    color: var(--light-crimson);
    transform: scale(1.05);
    text-shadow: 0 4px 20px rgba(184, 77, 111, 0.4);
}

.search-section {
    display: flex;
    gap: 20px;
    align-items: center;
}

.genre-select {
    padding: 14px 20px;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    background: rgba(42, 42, 42, 0.8);
    color: #ccc;
    font-size: 0.95rem;
    min-width: 220px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.genre-select:focus {
    border-color: var(--light-crimson);
    outline: none;
    box-shadow: 0 0 0 3px rgba(184, 77, 111, 0.2);
}

.search-box {
    display: flex;
    gap: 12px;
    background: rgba(42, 42, 42, 0.8);
    border-radius: 12px;
    padding: 4px;
    backdrop-filter: blur(10px);
}

#searchInput {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 0.95rem;
    width: 320px;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
}

#searchInput::placeholder {
    color: #888;
}

#searchBtn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-crimson), var(--light-crimson));
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#searchBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

#searchBtn:hover::before {
    left: 100%;
}

#searchBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(140, 47, 77, 0.4);
}

/* 1=1 主要内容布局 */
.main-content {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 40px;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;  /* 三列等宽 */
    gap: 30px;
    min-height: 700px;
}

.middle-column {
    display: grid;
    grid-template-rows: 1fr 1fr;  /* 中间列上下分割 */
    gap: 30px;
}

/* 通用区块样式 */
.section {
    background: linear-gradient(135deg, var(--card-bg), #1f1f1f);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #2a2a2a;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--light-crimson), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section:hover::before {
    opacity: 1;
}

.section:hover {
    border-color: var(--light-crimson);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--accent-gold);
    text-shadow: 0 2px 8px rgba(201, 169, 110, 0.2);
}

/* 新着アルバム */
.album-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.album-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    background: rgba(42, 42, 42, 0.6);
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.album-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(140, 47, 77, 0.1), transparent);
    transition: left 0.6s ease;
}

.album-item:hover::before {
    left: 100%;
}

.album-item:hover {
    background: rgba(42, 42, 42, 0.8);
    transform: translateX(8px);
    border-color: var(--light-crimson);
}

.album-cover {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-crimson), var(--light-crimson));
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.album-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: glowRotate 3s linear infinite;
}

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

.album-cover::after {
    content: '♪';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.4rem;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.album-info {
    flex: 1;
}

.album-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--accent-gold);
}

.album-info p {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 8px;
}

.album-badge {
    background: var(--light-crimson);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* おすすめ検索 */
.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    padding: 10px 18px;
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid #3a3a3a;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(184, 77, 111, 0.2), transparent);
    transition: left 0.5s ease;
}

.tag:hover::before {
    left: 100%;
}

.tag:hover {
    background: var(--primary-crimson);
    border-color: var(--light-crimson);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 20px rgba(140, 47, 77, 0.3);
}

/* 関連ワード */
.terms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    height: 100%;
}

.term-item {
    padding: 20px;
    background: rgba(42, 42, 42, 0.6);
    border: 1px solid #3a3a3a;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.term-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(140, 47, 77, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.term-item:hover::before {
    opacity: 1;
}

.term-item:hover {
    background: rgba(42, 42, 42, 0.8);
    border-color: var(--light-crimson);
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(140, 47, 77, 0.2);
}

.term-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
}

.term-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-gold);
}

/* ランキング */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: rgba(42, 42, 42, 0.6);
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rank-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 110, 0.1), transparent);
    transition: left 0.5s ease;
}

.rank-item:hover::before {
    left: 100%;
}

.rank-item:hover {
    background: rgba(42, 42, 42, 0.8);
    transform: translateX(8px);
    border: 1px solid var(--accent-gold);
}

.rank-number {
    background: linear-gradient(135deg, var(--primary-crimson), var(--light-crimson));
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(140, 47, 77, 0.3);
}

.rank-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rank-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.rank-stats {
    font-size: 0.8rem;
    color: #aaa;
}

.rank-trend {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--light-crimson);
}

/* 浮动动画 */
.floating-item {
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* 延迟动画 */
.album-item:nth-child(1) { animation-delay: 0s; }
.album-item:nth-child(2) { animation-delay: 1.5s; }
.album-item:nth-child(3) { animation-delay: 3s; }

.tag:nth-child(1) { animation-delay: 0.2s; }
.tag:nth-child(2) { animation-delay: 0.4s; }
.tag:nth-child(3) { animation-delay: 0.6s; }
.tag:nth-child(4) { animation-delay: 0.8s; }
.tag:nth-child(5) { animation-delay: 1s; }
.tag:nth-child(6) { animation-delay: 1.2s; }

.term-item:nth-child(1) { animation-delay: 0.1s; }
.term-item:nth-child(2) { animation-delay: 0.3s; }
.term-item:nth-child(3) { animation-delay: 0.5s; }
.term-item:nth-child(4) { animation-delay: 0.7s; }
.term-item:nth-child(5) { animation-delay: 0.9s; }
.term-item:nth-child(6) { animation-delay: 1.1s; }

.rank-item:nth-child(1) { animation-delay: 0.2s; }
.rank-item:nth-child(2) { animation-delay: 0.6s; }
.rank-item:nth-child(3) { animation-delay: 1s; }
.rank-item:nth-child(4) { animation-delay: 1.4s; }

/* 搜索结果 */
.search-results {
    display: none;
    max-width: 1400px;
    margin: 0 auto 60px;
    padding: 0 40px;
}

.search-results.active {
    display: block;
}

.results-container {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--light-crimson);
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 版权信息 */
.footer {
    background: rgba(10, 10, 10, 0.95);
    border-top: 1px solid #2a2a2a;
    padding: 40px 0;
    margin-top: 80px;
}

.copyright {
    text-align: center;
    color: var(--accent-gold);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .grid-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 20px;
    }
    
    .middle-column {
        grid-template-rows: auto auto;
        gap: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-section {
        flex-direction: column;
        width: 100%;
    }
    
    .genre-select, #searchInput {
        width: 100%;
    }
    
    .terms-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 20px;
    }
    
    .header-content {
        padding: 0 20px;
    }
    
    .section {
        padding: 20px;
    }
    
    .search-tags {
        justify-content: center;
    }
    
    .album-item {
        flex-direction: column;
        text-align: center;
    }
}

/* 专辑封面 */
.album-cover {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.album-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.album-item:hover .album-image {
    transform: scale(1.05);
}

.album-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(184, 77, 111, 0.3) 0%,
        rgba(201, 169, 110, 0.2) 50%,
        rgba(140, 47, 77, 0.4) 100%);
    mix-blend-mode: overlay;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.album-item:hover .album-glow {
    opacity: 0.8;
}