/* Global Footer for Chronicles of Apocalyptica */

.chronicles-footer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--gradient-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    z-index: 9999;
    box-shadow: 0 5px 20px var(--glow-color);
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    overflow: hidden;
}

.chronicles-footer.expanded {
    width: auto;
    height: auto;
    padding: 1rem;
    max-width: 400px;
}

/* Hamburger Menu Toggle */
.footer-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    gap: 6px;
}

.footer-toggle .hamburger-line {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.chronicles-footer.expanded .footer-toggle {
    display: none;
}

.chronicles-footer .footer-left {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.chronicles-footer.expanded .footer-left {
    display: flex;
}

.chronicles-footer .footer-right {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.chronicles-footer.expanded .footer-right {
    display: flex;
}

.chronicles-footer a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.chronicles-footer a:hover {
    background: var(--primary-color);
    color: #1a1a1a;
    box-shadow: 0 0 15px var(--glow-color);
    transform: translateY(-2px);
}

.chronicles-footer .discord-btn {
    background: #5865F2;
    border-color: #5865F2;
    color: white;
}

.chronicles-footer .discord-btn:hover {
    background: #4752C4;
    border-color: #4752C4;
    color: white;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.6);
}

.chronicles-footer .character-btn {
    background: var(--glow-color);
}

.chronicles-footer .footer-info {
    color: var(--primary-color);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Ensure page content doesn't get hidden behind footer */
body {
    padding-bottom: 20px !important;
}

/* Close button for expanded menu */
.footer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.chronicles-footer.expanded .footer-close {
    display: flex;
}

.footer-close:hover {
    color: #fff;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chronicles-footer {
        bottom: 15px;
        right: 15px;
    }

    .chronicles-footer.expanded {
        max-width: calc(100vw - 40px);
        right: 10px;
        bottom: 10px;
    }

    .chronicles-footer a {
        font-size: 0.9rem;
    }
}
