/* Base reset and typography */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #f5f5f5;
}

/* Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
}

/* Home page */
.home-header {
    text-align: center;
    padding: 2rem 0;
}

.home-header h1 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

.subtitle {
    margin: 0.5rem 0 0;
    color: #666;
    font-size: 1rem;
}

.collection {
    margin-bottom: 2rem;
}

.collection h2 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.collection-desc {
    margin: 0 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.pod-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pod-list li {
    margin-bottom: 0.5rem;
}

.pod-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s, transform 0.2s;
    min-height: 48px;
}

.pod-link:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.pod-title {
    font-weight: 600;
}

.pod-meta {
    font-size: 0.85rem;
    color: #888;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 3rem 1rem;
}

/* Reader */
.reader {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 2rem);
}

.reader-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.back-home {
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.back-home:hover {
    color: #333;
}

.pod-title-small {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Progress bar */
.progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.progress-fill {
    height: 100%;
    background: #2563eb;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: #888;
    text-align: center;
    margin-bottom: 1rem;
}

/* Message card */
.message-card {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.message-image {
    width: 100%;
    background: #f0f0f0;
}

.message-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 300px;
    object-fit: cover;
}

.message-body {
    padding: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.message-body p {
    margin: 0 0 1rem;
}

.message-body p:last-child {
    margin-bottom: 0;
}

/* Navigation */
.reader-nav {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    margin-top: auto;
}

.nav-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.nav-prev {
    background: #e5e7eb;
    color: #374151;
}

.nav-prev:hover:not(.nav-disabled) {
    background: #d1d5db;
}

.nav-next, .nav-restart {
    background: #2563eb;
    color: #fff;
}

.nav-next:hover, .nav-restart:hover {
    background: #1d4ed8;
}

.nav-disabled {
    visibility: hidden;
}

/* Empty pod */
.empty-pod {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #666;
}

.empty-pod .nav-btn {
    flex: 0;
    padding: 0.875rem 2rem;
    margin-top: 1rem;
}

/* Responsive adjustments */
@media (min-width: 481px) {
    .container {
        padding: 2rem;
    }
}
