/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif JP', serif;
    font-weight: 300;
    line-height: 1.7;
    letter-spacing: 0.03em;
    color: #1A1A1A;
    background-color: #ffffff;
    animation: fadeIn 1s ease-in-out;
}

/* Keyframe animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; /* ローディングオーバーレイをこのコンテナに相対配置 */
}

header {
    padding: 40px 0;
    text-align: center;
}

#logo {
    font-family: Arial, sans-serif; /* 幾何学的なサンセリフ */
    font-size: 2.5em;
    font-weight: 400;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}


nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav a {
    position: relative;
    text-decoration: none;
    color: #1A1A1A;
    font-weight: 300;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #333333;
    transition: width 0.3s ease;
}

nav a:hover {
    color: #333333;
}

nav a:hover::after {
    width: 100%;
}

main section {
    margin: 120px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

#search-input {
    width: 70%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    outline: none;
}

#search-btn {
    padding: 10px 15px;
    background-color: #1A1A1A;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-btn:hover {
    background-color: #333;
}

.release-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.release, article {
    margin: 40px 0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background-color: #fafafa;
    transition: box-shadow 0.3s ease;
}

.release:hover, article:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

article {
    border-left: 4px solid #e2e8f0;
    padding-left: 30px;
}

article time {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
    display: block;
}

footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

a {
    position: relative;
    text-decoration: none;
    color: #1A1A1A;
    transition: color 0.3s ease;
}

a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #333333;
    transition: width 0.3s ease;
}

a:hover {
    color: #333333;
}

a:hover::after {
    width: 100%;
}

.album-jacket {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.album-jacket:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.album-detail {
    margin: 120px 0;
    text-align: center;
}

.album-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.album-jacket-large {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.album-jacket-large:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.album-info {
    max-width: 600px;
    text-align: left;
}

.album-info h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.album-info .artist, .album-info .release-date {
    font-weight: 400;
    margin-bottom: 10px;
}

.album-info .description {
    line-height: 1.8;
    margin-bottom: 20px;
}

.tracklist, .streaming-links, .pricing, .related, .download-links, .player {
    text-align: left;
    max-width: 400px;
    margin: 40px auto;
}

.tracklist {
    text-align: center;
    max-width: 400px;
    margin: 40px auto;
}

.tracklist h3 {
    text-align: center;
}

.tracklist ol {
    text-align: left;
    display: inline-block;
}

.streaming-links, .download-links {
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
}

.streaming-links ul, .pricing, .related, .download-links ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.streaming-links li, .download-links li {
    margin-bottom: 0;
}

.streaming-links a, .download-links a {
    color: #1A1A1A;
    text-decoration: none;
    transition: color 0.3s ease;
}

.streaming-links a:hover, .download-links a:hover {
    color: #333333;
}

.player {
    max-width: 640px;
    height: 360px;
}

.player iframe {
    width: 100%;
    max-width: 640px;
    height: 360px;
    border: none;
    border-radius: 8px;
}

.play-btn {
    background-color: transparent;
    color: #1A1A1A;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    transition: color 0.3s ease;
}

.play-btn:hover {
    background-color: transparent;
    color: #333333;
}

.url-input {
    width: 200px;
    margin-left: 10px;
    padding: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.9em;
    transition: border-color 0.3s ease;
}

.url-input:focus {
    border-color: #333333;
}

.track-link {
    color: #1A1A1A;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.track-link:hover {
    color: #333333;
}

.album-title h2 {
    text-align: center;
    margin-bottom: 20px;
}

.album-details {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.album-description {
    max-width: 400px;
    margin: 20px auto;
    line-height: 1.8;
    text-align: center;
}

.related {
    text-align: center;
    max-width: 400px;
    margin: 40px auto;
}

.album-info .artist a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.album-info .artist a i {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.album-info .artist a:hover i {
    transform: translateX(3px);
}

.album-info .artist a i {
    font-size: 0.8em;
}

.track-detail {
    padding: 60px 0;
}

.track-header {
    text-align: center;
    margin-bottom: 40px;
}

.track-header h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.track-header p {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.track-header a {
    color: #1A1A1A;
    text-decoration: none;
    transition: color 0.3s ease;
}

.track-header a:hover {
    color: #666;
}

.player-container {
    text-align: center;
    margin-bottom: 40px;
}

.player-container iframe {
    max-width: 100%;
    height: auto;
}

#player {
    width: 640px;
    height: 360px;
    max-width: 100%;
}

.track {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background-color: #fafafa;
    transition: box-shadow 0.3s ease;
}

/* Improved Release Card Styles */
.release-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.release-grid .release {
    margin: 0; /* Reset margin inside grid */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.release-image-wrapper {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.release .album-jacket {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.release-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left; /* Ensure text aligns left for better readability */
}

.release-title {
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
    color: #1A1A1A;
}

.release-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #666;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.release-artist, .release-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.release-artist i, .release-date i {
    width: 16px;
    text-align: center;
    color: #888;
    font-size: 0.9em;
}

.release-description {
    font-size: 0.9em;
    line-height: 1.6;
    color: #444;
    
    /* Text Truncation (3 lines) */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Search results layout */
.search-results {
    margin-top: 20px;
}
.search-hit-count h2 {
    font-size: 28px;
    margin-bottom: 10px;
}
.search-sep {
    text-align: right;
    color: #999;
    font-weight: 600;
    margin-bottom: 10px;
}
.search-sep.small {
    text-align: left;
    margin: 6px 0 12px;
}
.search-section h3 {
    font-size: 20px;
    margin-bottom: 8px;
}
.album-results .release-link {
    text-decoration: none;
    color: inherit;
}
.track-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.track-link {
    text-decoration: none;
    color: inherit;
}
.track-link .track h4 {
    margin: 0 0 6px 0;
}
.track p {
    margin: 0;
    color: #555;
}

/* Loading overlay for search */
#loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.85);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* New loader animation (provided by user) */
.loader {
  width: 40px;
  aspect-ratio: 1;
  display: grid;
}
.loader::before,
.loader::after {
  content: "";
  grid-area: 1/1;
  --c:no-repeat linear-gradient(#046D8B 0 0);
  background:
    var(--c) 0 0,
    var(--c) 100% 0,
    var(--c) 100% 100%,
    var(--c) 0 100%;
  /* アニメーションにフェードアウトを追加（周期は1.25s）
     0.5s〜0.7s の範囲でフェードアウトするように割合で指定
     0.5/1.25 = 40% , 0.7/1.25 = 56% */
  animation: 
    l10-1 1.25s infinite linear,
    l10-2 1.25s infinite linear,
    fadeout 1.25s infinite linear;
}
.loader::after {
  margin: 25%;
  transform: scale(-1);
}
@keyframes l10-1 {
  0%   {background-size: 0    4px,4px 0   ,0    4px,4px 0   }
  12.5%{background-size: 100% 4px,4px 0   ,0    4px,4px 0   }
  25%  {background-size: 100% 4px,4px 100%,0    4px,4px 0   }
  37.5%{background-size: 100% 4px,4px 100%,100% 4px,4px 0   }
  45%,
  55%  {background-size: 100% 4px,4px 100%,100% 4px,4px 100%}
  62.5%{background-size: 0    4px,4px 100%,100% 4px,4px 100%}
  75%  {background-size: 0    4px,4px 0   ,100% 4px,4px 100%}
  87.5%{background-size: 0    4px,4px 0   ,0    4px,4px 100%}
  100% {background-size: 0    4px,4px 0   ,0    4px,4px 0   }
}

@keyframes l10-2 {
  0%,49.9%{background-position: 0 0   ,100% 0   ,100% 100%,0 100%}
  50%,100%{background-position: 100% 0,100% 100%,0    100%,0 0   }
}

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

@keyframes fadeout {
  0% { opacity: 1; }
  40% { opacity: 1; }
  56% { opacity: 0; }
  100% { opacity: 0; }
}

/* Ensure overlay centers loader even if container is tall */
#loading-overlay {
  display: none; /* default hidden */
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  /* ローディングと同じフェードアウトを適用（周期1.25s、0.5s〜0.7sでフェード） */
  animation: fadeout 1.25s infinite linear;
}

/* Artists Page Styles */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.artist-card {
    background-color: #fafafa;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

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

.artist-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #eee;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.artist-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-icon i {
    font-size: 60px;
    color: #ccc;
}

.artist-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.artist-info h3 {
    margin-bottom: 5px;
    font-size: 1.4em;
}

.artist-info h3 a {
    text-decoration: none;
    color: #1A1A1A;
}

.artist-role {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.artist-desc {
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #444;
}

.artist-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: auto;
}

.artist-socials a {
    color: #555;
    font-size: 1.2em;
    transition: color 0.3s ease, transform 0.3s ease;
}

.artist-socials a:hover {
    color: #1A1A1A;
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    #logo {
        font-size: 2em;
    }

    nav ul {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }

    main section {
        margin: 80px 0;
    }

    .release-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .release {
        padding: 15px;
    }

    .release-title {
        font-size: 1em;
    }

    .release-meta {
        font-size: 0.8em;
    }

    .album-header {
        flex-direction: column;
        gap: 20px;
    }

    .album-jacket-large {
        max-width: 100%;
    }

    .album-info {
        max-width: 100%;
        text-align: center;
    }

    .album-info h2 {
        font-size: 2em;
    }

    .tracklist, .streaming-links, .download-links, .related {
        max-width: 100%;
    }

    .streaming-links ul, .download-links ul {
        flex-direction: column;
        gap: 10px;
    }

    .artist-card {
        padding: 20px;
    }

    .artist-icon {
        width: 100px;
        height: 100px;
    }

    .artist-info h3 {
        font-size: 1.2em;
    }

    .artist-role {
        font-size: 0.8em;
    }

    .artist-desc {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    #logo {
        font-size: 1.5em;
    }

    nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    main section {
        margin: 60px 0;
    }

    .album-info h2 {
        font-size: 1.8em;
    }

    .play-btn {
        font-size: 12px;
        padding: 3px 8px;
    }

    .artist-card {
        padding: 15px;
    }

    .artist-icon {
        width: 80px;
        height: 80px;
    }

    .artist-info h3 {
        font-size: 1.1em;
    }

    .artist-role {
        font-size: 0.75em;
    }

    .artist-desc {
        font-size: 0.85em;
    }
}
