/* Base Styles - Matching Fables Adventures Design */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #08386E 0%, #0a5091 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

/* Logo Section */
.logo-container {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 0.8s ease-in;
}

.logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

/* Hero Section */
.hero-section {
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto 60px auto;
    animation: fadeInUp 1s ease-in;
}

h1 {
    font-size: 48px;
    margin: 0 0 20px 0;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 24px;
    margin: 0 0 30px 0;
    font-weight: 300;
    opacity: 0.95;
}
.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: #08386E;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #08386E;
}
/* Feed Controls */
.feed-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.sort-label {
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.sort-dropdown {
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.95);
    color: #08386E;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sort-dropdown:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.sort-dropdown:focus {
    outline: none;
    border-color: white;
}

/* Stories Container */
.stories-container {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 1.2s ease-in;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Story Card - Matching index.html Style */
.story-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.story-cover {
    width: 100%;
    height: 200px;
    position: relative;
    background: linear-gradient(135deg, #08386E 0%, #0a5091 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    overflow: hidden;
}

.story-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-card:hover .story-cover img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-card:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.play-button svg {
    width: 24px;
    height: 24px;
    fill: #08386E;
    margin-left: 3px;
}

.story-info {
    padding: 20px;
}

.story-title {
    font-size: 20px;
    font-weight: bold;
    color: #08386E;
    margin: 0 0 10px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 48px;
}

.story-author {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.author-link {
    color: #08386E;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.author-link:hover {
    color: #0a5091;
}

.story-stats {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 14px;
    align-items: center;
}

.story-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.age-badge {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #08386E;
}

/* Loading States */
.loading-indicator {
    text-align: center;
    padding: 40px;
    color: white;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error-message {
    text-align: center;
    padding: 40px;
    background: rgba(220, 38, 38, 0.1);
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 15px;
    color: white;
    margin: 20px auto;
    max-width: 600px;
}

.error-message p {
    margin: 0 0 20px 0;
    font-size: 18px;
}

.retry-button {
    background: white;
    color: #08386E;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.end-message {
    text-align: center;
    padding: 40px;
    color: white;
    font-size: 20px;
    opacity: 0.9;
}

/* Footer Section - Matching Existing Templates */
.footer-section {
    max-width: 1200px;
    margin: 60px auto 0 auto;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(8, 56, 110, 0.4);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mission-statement {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.mission-logo-container {
    flex-shrink: 0;
}

.lll-logo {
    max-width: 200px;
    height: auto;
}

.mission-text h3 {
    color: #08386E;
    font-size: 24px;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.mission-text p {
    color: #444;
    line-height: 1.8;
    margin: 0;
    font-size: 15px;
}

.mission-highlight {
    font-weight: 600;
    color: #08386E;
}

.inline-link {
    color: #08386E;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.2s ease;
}

.inline-link:hover {
    border-bottom: 2px solid #08386E;
}

.footer-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-btn {
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-btn-primary {
    background: linear-gradient(135deg, #08386E 0%, #0a5091 100%);
    color: white;
}

.footer-btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(8, 56, 110, 0.3);
}

.footer-btn-secondary {
    background: white;
    color: #08386E;
    border: 2px solid #08386E;
}

.footer-btn-secondary:hover {
    background: #08386E;
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.footer-bottom p {
    color: #666;
    margin: 10px 0;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.footer-links a {
    color: #08386E;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 0.7;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 36px;
    }
    
    .subtitle {
        font-size: 18px;
    }
    
    .stories-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .mission-statement {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-actions {
        flex-direction: column;
    }
    
    .footer-btn {
        width: 100%;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-links span {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 20px 15px;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .feed-controls {
        flex-direction: column;
    }
}
