/* VoiceMoments Design System */
:root {
    --vm-primary: #030f3b;
    --vm-secondary: #056ea3;
    --vm-highlight: #c3b17d;
    --vm-container: #eae6da;
    --vm-danger: #c50568;
    --vm-audio: #dd6643;
    --vm-placeholder: #626e82;
    --vm-white: #ffffff;
    --vm-light-gray: #c0c0c0;
    --vm-black: #000000;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    color: var(--vm-primary);
    background-color: var(--vm-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.site-header {
    background: var(--vm-primary);
    color: var(--vm-white);
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.header-inner {
    max-width: 48rem;
    margin: 0 auto;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.site-tagline {
    font-size: 1.125rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.85;
}

/* Gallery index grid */
.gallery-grid {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.gallery-card {
    background: var(--vm-container);
    border-radius: 0.75rem;
    overflow: hidden;
    text-decoration: none;
    color: var(--vm-primary);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(3, 15, 59, 0.15);
}

.gallery-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    padding: 0.75rem 1rem;
    line-height: 1.4;
}

/* Back navigation link */
.back-link {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--vm-secondary);
    text-decoration: none;
    margin-bottom: 1rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Moment detail layout */
.moments-gallery {
    max-width: 40rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Moment card */
.moment-card {
    background: var(--vm-container);
    border-radius: 0.75rem;
    overflow: hidden;
}

.moment-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vm-primary);
    margin: 0;
    padding: 1.5rem 1.5rem 0;
    text-align: center;
}

.moment-body {
    padding: 1.5rem;
}

/* Photo */
.photo-container {
    text-align: center;
    padding-bottom: 1rem;
}

.photo-container img {
    max-width: 100%;
    max-height: 20rem;
    margin: 0 auto;
    display: block;
    border-radius: 0.5rem;
}

/* Audio Player */
.audio-container {
    padding: 0.75rem 0;
}

.audio-player {
    position: relative;
    width: 100%;
    background: var(--vm-white);
    border-radius: 1.5rem;
    padding: 0.5rem 1rem;
}

.audio-player audio {
    display: none;
}

.player-controls {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-btn,
.pause-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 1.875rem;
    height: 1.875rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn svg,
.pause-btn svg {
    width: 1.875rem;
    height: 1.875rem;
}

.play-track {
    position: relative;
    flex: 1;
    margin: 0 1.5rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.play-bar-outside {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: rgba(3, 15, 59, 0.3);
}

.play-bar-inside {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: var(--vm-primary);
    width: 0%;
    transition: width 0.15s linear;
}

.play-scrubber {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--vm-audio);
    cursor: pointer;
    transition: left 0.15s linear;
}

.play-time {
    font-size: 1rem;
    font-weight: 500;
    flex-shrink: 0;
    min-width: 3rem;
    text-align: right;
}

/* Description */
.description-container {
    padding: 1rem;
    background: var(--vm-white);
    border-radius: 0.75rem;
    line-height: 1.6;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--vm-placeholder);
    font-size: 0.875rem;
    border-top: 1px solid var(--vm-light-gray);
    margin-top: 2rem;
}

.site-footer p {
    margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .site-title {
        font-size: 1.75rem;
    }

    .site-tagline {
        font-size: 1rem;
    }

    .moment-title {
        font-size: 1.25rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        padding: 1rem 0.75rem;
        gap: 1rem;
    }

    .moments-gallery {
        padding: 1rem 0.75rem;
        gap: 2rem;
    }

    .moment-body {
        padding: 1rem;
    }

    .play-track {
        margin: 0 0.75rem;
    }
}
