:root {
    --footer-bg: var(--cinebrain-darker);
    --footer-bg-secondary: var(--cinebrain-gray-dark);
    --footer-text-primary: #ffffff;
    --footer-text-secondary: var(--cinebrain-text-secondary);
    --footer-text-muted: #6B7280;
    --footer-border: rgba(255, 255, 255, 0.1);
    --footer-link-hover: var(--cinebrain-primary-light);
    --footer-spacing: clamp(16px, 4vw, 24px);
    --footer-section-gap: clamp(24px, 6vw, 40px);
}

[data-theme="light"] {
    --footer-bg: #F9FAFB;
    --footer-bg-secondary: #F3F4F6;
    --footer-text-primary: var(--cinebrain-gray-dark);
    --footer-text-secondary: #6B7280;
    --footer-text-muted: var(--cinebrain-text-secondary);
    --footer-border: rgba(0, 0, 0, 0.1);
    --footer-link-hover: var(--cinebrain-primary);
}

.footer-cinebrain {
    background: var(--footer-bg);
    color: var(--footer-text-primary);
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--footer-spacing);
}

.footer-main {
    padding: clamp(40px, 8vw, 60px) 0 clamp(24px, 6vw, 40px);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--footer-section-gap);
}

@media (min-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr 2fr;
        gap: clamp(40px, 8vw, 80px);
    }
}

.footer-brand {
    max-width: 400px;
}

.footer-logo h3 {
    font-family: 'Bangers', cursive;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 0 0 clamp(4px, 1vw, 8px) 0;
    background: linear-gradient(135deg, var(--cinebrain-primary) 0%, var(--cinebrain-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.footer-tagline {
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    color: var(--footer-text-secondary);
    font-weight: 500;
    display: block;
    margin-bottom: clamp(12px, 3vw, 16px);
}

.footer-description {
    font-size: clamp(0.875rem, 2.2vw, 0.95rem);
    line-height: 1.6;
    color: var(--footer-text-secondary);
    margin: 0 0 clamp(20px, 5vw, 24px) 0;
}

.footer-social {
    display: flex;
    gap: clamp(12px, 3vw, 16px);
    align-items: center;
    justify-content: center;
    margin-top: clamp(4px, 1vw, 8px);
}

@media (min-width: 768px) {
    .footer-social {
        justify-content: flex-start;
    }
}

.footer-social-link {
    width: clamp(36px, 9vw, 40px);
    height: clamp(36px, 9vw, 40px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--footer-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .footer-social-link {
    background: rgba(0, 0, 0, 0.03);
}

.footer-social-link:hover,
.footer-social-link:focus {
    background: var(--cinebrain-primary);
    color: white;
    transform: translateY(-2px);
    border-color: var(--cinebrain-primary);
}

.footer-social-link:focus-visible {
    outline: 2px solid var(--cinebrain-primary-light);
    outline-offset: 2px;
}

.footer-social-link svg {
    width: 50%;
    height: 50%;
    stroke-width: 2;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(24px, 6vw, 32px);
}

@media (min-width: 480px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(20px, 4vw, 40px);
    }
}

.footer-section {
    text-align: left;
}

.footer-section-title {
    font-size: clamp(0.9rem, 2.2vw, 1rem);
    font-weight: 600;
    margin: 0 0 clamp(10px, 2.5vw, 14px) 0;
    color: var(--footer-text-primary);
    letter-spacing: -0.01em;
    text-align: left;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.footer-list li {
    margin-bottom: clamp(4px, 1vw, 6px);
}

.footer-link {
    color: var(--footer-text-secondary);
    text-decoration: none;
    font-size: clamp(0.8rem, 2vw, 0.875rem);
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    padding: clamp(2px, 0.5vw, 3px) 0;
    text-align: left;
}

.footer-link:hover,
.footer-link:focus {
    color: var(--footer-link-hover);
    transform: translateX(4px);
}

.footer-link:focus-visible {
    outline: 2px solid var(--cinebrain-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.footer-bottom {
    background: var(--footer-bg);
    border-top: 1px solid var(--footer-border);
    padding: clamp(12px, 3vw, 16px) 0;
    position: relative;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.5vw, 8px);
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        gap: clamp(20px, 5vw, 32px);
    }
}

.footer-copyright {
    flex: 1;
}

.footer-copyright p {
    font-size: clamp(0.7rem, 1.6vw, 0.813rem);
    color: var(--footer-text-muted);
    margin: 0;
    line-height: 1.4;
}

.copyright-line {
    display: block;
    margin-bottom: clamp(8px, 2vw, 12px);
}

.copyright-line:last-child {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .copyright-line {
        display: inline;
        margin-bottom: 0;
    }

    .copyright-line:first-child::after {
        content: " ";
    }

    .footer-copyright p {
        line-height: 1.5;
    }
}

.heart {
    color: #EF4444;
    animation: heartbeat 2s ease-in-out infinite;
    display: inline-block;
    cursor: help;
    position: relative;
}

.heart::after {
    content: "SN";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 0.5rem;
    color: white;
    font-weight: bold;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.heart:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.footer-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0;
}

@media (min-width: 768px) {
    .footer-legal {
        justify-content: flex-end;
    }
}

.legal-line {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
}

@media (min-width: 768px) {
    .legal-line {
        justify-content: flex-end;
    }
}

.footer-legal-link {
    color: var(--footer-text-muted);
    text-decoration: none;
    font-size: clamp(0.65rem, 1.4vw, 0.75rem);
    font-weight: 400;
    transition: color 0.3s ease;
    padding: clamp(2px, 0.5vw, 4px) clamp(2px, 0.5vw, 4px);
    border-radius: 3px;
    white-space: nowrap;
}

.footer-legal-link:hover,
.footer-legal-link:focus {
    color: var(--footer-link-hover);
}

.footer-legal-link:focus-visible {
    outline: 2px solid var(--cinebrain-primary);
    outline-offset: 1px;
}

.developer-credit-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #6366f1, #818cf8);
    padding: 30px;
    border-radius: 15px;
    color: white;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
    animation: fadeIn 0.5s ease;
}

.developer-credit-popup h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.developer-credit-popup p {
    margin: 0;
    font-size: 16px;
}

.developer-credit-popup .dev-name {
    margin: 10px 0;
    font-size: 20px;
    font-weight: bold;
}

.developer-credit-popup .github-link {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: inline-block;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.developer-credit-popup .github-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

@media (max-width: 480px) {
    .footer-main {
        text-align: left;
    }

    .footer-brand {
        max-width: none;
        text-align: center;
    }

    .footer-logo,
    .footer-tagline,
    .footer-description {
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-section {
        text-align: left;
        padding-left: 0;
    }

    .footer-section-title {
        text-align: left;
        padding-left: 0;
    }

    .footer-list {
        text-align: left;
    }

    .footer-list li {
        margin-bottom: clamp(3px, 0.75vw, 5px);
    }

    .footer-bottom {
        padding: clamp(10px, 2.5vw, 14px) 0;
    }

    .footer-bottom-content {
        gap: clamp(4px, 1vw, 6px);
    }

    .copyright-line {
        display: block;
        margin-bottom: clamp(6px, 1.5vw, 10px);
    }

    .copyright-line:last-child {
        margin-bottom: 0;
    }

    .footer-copyright p {
        font-size: clamp(0.65rem, 1.4vw, 0.75rem);
        line-height: 1.3;
    }

    .legal-line {
        flex-direction: row;
        gap: clamp(6px, 1.5vw, 8px);
        flex-wrap: wrap;
        justify-content: center;
        margin: 0;
    }

    .footer-legal-link {
        display: inline-block;
        text-align: center;
        font-size: clamp(0.6rem, 1.3vw, 0.7rem);
        padding: clamp(2px, 0.5vw, 4px) clamp(2px, 0.5vw, 4px);
        white-space: nowrap;
        margin: 0;
    }
}

@media (max-width: 360px) {
    .footer-bottom {
        padding: 10px 0;
    }

    .footer-bottom-content {
        gap: 4px;
    }

    .copyright-line {
        margin-bottom: 6px;
    }

    .copyright-line:last-child {
        margin-bottom: 0;
    }

    .footer-copyright p {
        font-size: 0.65rem;
        line-height: 1.25;
    }

    .footer-legal-link {
        font-size: 0.6rem;
        padding: 2px;
    }

    .footer-list li {
        margin-bottom: 3px;
    }
}

@media print {

    .footer-social,
    .footer-links {
        display: none;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-copyright p {
        color: black !important;
    }

    .footer-legal-link {
        color: black !important;
    }

    .footer-cinebrain::after {
        content: "/* Crafted by Srinath Nulidonda - github.com/Srinathnulidonda */";
        display: block;
        font-size: 0.6rem;
        text-align: center;
        margin-top: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .footer-link,
    .footer-social-link,
    .heart,
    .footer-link:hover {
        transition: none;
        animation: none;
        transform: none;
    }

    .footer-social-link:hover {
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .footer-cinebrain {
        border-top: 2px solid currentColor;
    }

    .footer-link,
    .footer-legal-link {
        text-decoration: underline;
    }

    .footer-social-link {
        border-width: 2px;
    }
}

.footer-cinebrain *:focus-visible {
    outline: 2px solid var(--cinebrain-primary);
    outline-offset: 2px;
    border-radius: 3px;
}

@media (hover: none) and (pointer: coarse) {
    .footer-link:hover {
        transform: none;
    }

    .footer-social-link:hover {
        transform: none;
    }

    .footer-link:active {
        color: var(--footer-link-hover);
        transform: scale(0.98);
    }

    .footer-social-link:active {
        background: var(--cinebrain-primary);
        color: white;
        transform: scale(0.95);
    }
}

@media (max-width: 768px) {
    .footer-link {
        padding: clamp(4px, 1vw, 6px) clamp(2px, 0.5vw, 4px);
        margin: clamp(1px, 0.25vw, 2px) 0;
    }

    .footer-legal-link {
        padding: clamp(6px, 1.5vw, 10px) clamp(4px, 1vw, 8px);
        margin: clamp(2px, 0.5vw, 4px) 0;
    }

    .footer-social-link {
        margin: clamp(4px, 1vw, 6px);
    }
}

[data-theme="dark"] .footer-logo h3 {
    background: linear-gradient(135deg, var(--cinebrain-primary-light) 0%, var(--cinebrain-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .footer-logo h3 {
    background: linear-gradient(135deg, var(--cinebrain-primary-dark) 0%, var(--cinebrain-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-social-link:focus-visible,
.footer-link:focus-visible,
.footer-legal-link:focus-visible {
    outline: 2px solid var(--cinebrain-primary-light);
    outline-offset: 3px;
    border-radius: 4px;
    background: rgba(17, 60, 207, 0.1);
}

.footer-brand,
.footer-links,
.footer-bottom {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.footer-brand {
    animation-delay: 0.1s;
}

.footer-links {
    animation-delay: 0.2s;
}

.footer-bottom {
    animation-delay: 0.3s;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {

    .footer-brand,
    .footer-links,
    .footer-bottom {
        animation: none;
        opacity: 1;
        transform: none;
    }
}