/* Entries page specific styles - Dark Theme compatible */
.entries-intro {
    margin-bottom: 2rem;
    text-align: left;
}

.entries-intro p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--form-text, #666);
}

[data-theme="dark"] .entries-intro p,
body.dark .entries-intro p {
    color: var(--form-text, #999);
}

.entries-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.entry-card {
    background: var(--form-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.entry-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Selfie container with relative positioning for overlay */
.entry-selfie-container {
    position: relative;
    width: 100%;
}

.entry-selfie-hero {
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
    display: block;
}

.entry-selfie-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Date/Time overlay badge */
.entry-date-overlay {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(255, 255, 255, 0.85);
    color: #333;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

/* Dark mode date overlay */
[data-theme="dark"] .entry-date-overlay,
body.dark .entry-date-overlay {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.entry-selfie-placeholder {
    aspect-ratio: 1 / 1;
    width: 100%;
    background: var(--muted, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground, #a0a0a0);
    font-size: 0.9rem;
}

.entry-content {
    padding: 1.5rem;
    text-align: left;
    align-items: flex-start;
}

/* Entry labels */
.entry-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
    opacity: 0.7;
    color: var(--muted-foreground, #666);
}

[data-theme="dark"] .entry-label,
body.dark .entry-label {
    color: var(--muted-foreground, #999);
}

.entry-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--foreground, #111);
    line-height: 1.3;
}

[data-theme="dark"] .entry-name,
body.dark .entry-name {
    color: var(--foreground, #ffffff);
}

.entry-message {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    color: var(--foreground, #333);
    white-space: pre-wrap;
    word-wrap: break-word;
}

[data-theme="dark"] .entry-message,
body.dark .entry-message {
    color: var(--foreground, #e0e0e0);
}

.song-preview-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--accent, #2a2a2a);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.song-preview-row:hover {
    background: var(--accent-hover, #3a3a3a);
}

.song-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.song-no-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: var(--muted, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground, #a0a0a0);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-weight: 600;
    color: var(--foreground, #111);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .song-title,
body.dark .song-title {
    color: var(--foreground, #ffffff);
}

.song-artist {
    font-size: 0.875rem;
    color: var(--muted-foreground, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .song-artist,
body.dark .song-artist {
    color: var(--muted-foreground, #a0a0a0);
}

.song-album {
    font-size: 0.75rem;
    color: var(--muted-foreground, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.25rem;
}

[data-theme="dark"] .song-album,
body.dark .song-album {
    color: var(--muted-foreground, #a0a0a0);
}

.entries-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted-foreground, #a0a0a0);
}

.entries-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.entries-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--muted, #2a2a2a);
    border-top: 2px solid var(--muted-foreground, #a0a0a0);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Static song display for entries page - neutral styling */
.song-result-static {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--header-border);
    border-radius: 8px;
    margin-top: 8px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 2px;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.song-result-static:hover {
    background: var(--content-section-bg);
}

.song-result__cover {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-result__cover img,
.song-result__cover .no-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
}

.song-result__cover .no-cover {
    background: var(--muted, #2a2a2a);
    color: var(--muted-foreground, #a0a0a0);
    font-size: 1.2rem;
}

.song-result__meta {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    min-width: 0;
}

.song-result__title {
    font-weight: 600;
    color: var(--foreground, #111);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .song-result__title,
body.dark .song-result__title {
    color: var(--foreground, #ffffff);
}

.song-result__artist {
    font-size: 0.875rem;
    color: var(--muted-foreground, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .song-result__artist,
body.dark .song-result__artist {
    color: var(--muted-foreground, #a0a0a0);
}

.song-result__album {
    font-size: 0.75rem;
    color: var(--muted-foreground, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.25rem;
}

[data-theme="dark"] .song-result__album,
body.dark .song-result__album {
    color: var(--muted-foreground, #a0a0a0);
}

/* Song result footer */
.song-result-footer {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px -8px -8px;
    padding: 4px 10px;
    border-top: 1px solid transparent;
    border-radius: 0 0 8px 8px;
    background: var(--header-border);
}

.song-result-footer__text {
    font-size: 0.78rem;
    line-height: 1.2;
    opacity: 0.85;
    color: var(--foreground, #111);
}

[data-theme="dark"] .song-result-footer__text,
body.dark .song-result-footer__text {
    color: var(--foreground, #e0e0e0);
}

.song-result-footer__icon {
    font-size: 1.0rem;
    color: #1DB954;
    opacity: 0.95;
}

.song-result-footer__icon,
.song-result-footer__icon * {
    pointer-events: none;
}

@media (max-width: 768px) {
    .entries-intro p {
        font-size: 0.95rem;
    }

    .entries-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .entry-content {
        padding: 1rem;
    }

    .entry-date-overlay {
        right: 8px;
        bottom: 8px;
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

/* Optional Q&A Styles */
.optional-qa-item {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--header-border);
}

.optional-qa-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.optional-question {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.15rem;
    opacity: 0.7;
    color: var(--muted-foreground, #666);
}

[data-theme="dark"] .optional-question,
body.dark .optional-question {
    color: var(--muted-foreground, #999);
}

.optional-answer {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--foreground, #333);
    white-space: pre-wrap;
    word-wrap: break-word;
}

[data-theme="dark"] .optional-answer,
body.dark .optional-answer {
    color: var(--foreground, #e0e0e0);
}
