:root {
    --footer-bg: #4A90E2;
    --footer-text: #fff;
    --footer-link: #E0F7FF;
    --footer-link-hover: #ffffff;
    --spacing: clamp(0.5rem, 2vw, 1rem);
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: calc(var(--spacing) * 1) 0;
    text-align: center;
    margin-top: auto;
    width: 100%;
    position: relative; 
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem); 
}

.footer-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-attribution {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.footer-actions {
    display: flex;
    align-items: center;
}

.footer p {
    margin: 0; 
    opacity: 0.9;
}

.tmdb-attribution {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    justify-content: center;
}

.tmdb-link {
    display: inline-flex;
    align-items: center;
}

.tmdb-logo {
    height: 14px;
    width: auto;
    filter: brightness(0) invert(1);
    vertical-align: middle;
}

.footer a {
    color: var(--footer-link);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--footer-link-hover);
}

.footer a.footer-about-btn {
    display: inline-block;
    background: #fff;
    color: var(--footer-bg) !important;
    padding: 0.5em 1.2em;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: none;
    cursor: pointer;
}

.footer a.footer-about-btn:hover {
    background: var(--footer-link) !important;
    color: var(--footer-bg) !important;
}

@media (max-width: 480px) {
    .footer {
        padding: var(--spacing) 0;
    }
    
    .footer-attribution {
        gap: 0.25rem;
    }
    
    .tmdb-attribution {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .tmdb-logo {
        height: 12px;
    }
}

@media (max-width: 600px) {
    .footer-main {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-attribution {
        order: 1;
    }
    
    .footer-actions {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .footer-about-btn {
        width: auto;
        min-width: 120px;
        text-align: center;
    }
}