/* Reset e variabili */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main content */
main {
    padding: 3rem 2rem;
}

.audiobooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Audiobook card */
.audiobook-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.audiobook-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.audiobook-cover {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-light);
}

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

.audiobook-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.audiobook-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.author {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.description {
    color: var(--text-light);
    font-size: 0.938rem;
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.5;
}

.episodes {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Actions */
.actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.938rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

.btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* Podcast apps */
.podcast-apps {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.small-text {
    font-size: 0.813rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.app-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-links a {
    font-size: 0.813rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.app-links a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state p {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.empty-state code {
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Footer */
footer {
    background: var(--bg-light);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

footer code {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.813rem;
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .audiobooks-grid {
        grid-template-columns: 1fr;
    }
    
    .audiobook-cover {
        height: 240px;
    }
}