@import url('./variables.css');
@import url('./header.css');
@import url('./hero.css');
@import url('./base.css');
@import url('./cards.css');
@import url('./gallery.css');
@import url('./player.css');
@import url('./contact.css');
@import url('./responsive.css');

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: 2px solid rgba(255,255,255,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

#back-to-top:active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(0.95);
}

@media (max-width: 768px) {
    #back-to-top {
        bottom: 90px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

/* Ad Banner Styles */
.ad-banner-section {
    padding: 5px 0;
    background: transparent;
}

.ad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.ad-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #000;
    width: 100%;
}

.ad-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.6);
}

.ad-wrapper img {
    display: block;
    transition: opacity 0.3s ease;
}

.ad-wrapper:hover img {
    opacity: 0.9;
}

.ad-banner-long {
    max-width: 728px;
}

.ad-banner-square {
    max-width: 512px;
}

.ad-banner-section.ad-half {
    width: 50%;
    display: inline-block;
    vertical-align: top;
    padding: 20px 0;
}

@media (max-width: 768px) {
    .ad-wrapper {
        max-width: 100% !important;
    }
    .ad-container {
        padding: 0 15px;
    }
    .ad-banner-section.ad-half {
        width: 100%;
        display: block;
    }
}

/* PWA Install Banner */
.pwa-banner {
    position: fixed;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 520px;
    background: rgba(10, 10, 30, 0.98);
    border: 2px solid var(--primary);
    border-radius: 24px;
    padding: 16px 24px;
    z-index: 10001;
    box-shadow: 0 15px 50px rgba(0,0,0,0.9);
    transition: bottom 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s ease;
    backdrop-filter: blur(15px);
    opacity: 0;
    visibility: hidden;
}

.pwa-banner.visible {
    bottom: 25px;
    opacity: 1;
    visibility: visible;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    width: 100%;
}

.pwa-banner-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0; /* Prevent text overflow issues */
}

.pwa-mini-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    object-fit: cover;
    flex-shrink: 0;
}

.pwa-banner p {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: left;
    color: white;
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pwa-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.8rem;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.3s ease;
    animation: pwa-pulse-btn 2s infinite;
}

@keyframes pwa-pulse-btn {
    0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 255, 126, 0), 0.7); transform: scale(1); }
    70% { box-shadow: 0 0 0 15px rgba(var(--primary-rgb, 255, 126, 0), 0); transform: scale(1.05); }
    100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 255, 126, 0), 0); transform: scale(1); }
}

.pwa-btn:hover {
    transform: scale(1.08);
    filter: brightness(1.2);
}

.pwa-close {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background 0.2s;
}

.pwa-close:hover {
    background: rgba(255,255,255,0.2);
}

@media (max-width: 480px) {
    .pwa-banner {
        width: 95%;
        padding: 6px 10px;
    }
    .pwa-banner p {
        font-size: 0.7rem;
    }
}

/* Request Song Button */
.request-song-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--primary);
    padding: 15px 35px;
    border-radius: 100px;
    text-decoration: none;
    color: white;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.2);
    max-width: 100%;
}

.request-song-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.request-icon-pulse {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.request-icon-pulse i {
    width: 22px;
    height: 22px;
}

.request-icon-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: pulse-ring 3s infinite;
    filter: brightness(1.5);
}

@keyframes pulse-ring {
    0% { transform: scale(0.9); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 0; }
}

.request-text {
    display: flex;
    flex-direction: column;
}

.request-sub {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.request-main {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

@media (max-width: 600px) {
    .request-song-btn {
        padding: 15px 30px;
    }
    .request-main { font-size: 1.1rem; }
}

/* Custom Module Layouts */
.mod-layout-centered .mod-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.mod-layout-columns .mod-content-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    align-items: start;
}

/* Ensure images inside centered custom modules don't overflow */
.mod-layout-centered img {
    max-width: 100%;
    height: auto;
}

/* Pop-up Ad Styles */
.ad-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
    animation: adPopupFadeIn 0.4s ease;
}

.ad-popup-content {
    position: relative;
    max-width: 512px;
    width: 100%;
    background: #000;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.1);
    animation: adPopupScaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ad-popup-inner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.ad-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
}

.ad-popup-close:hover {
    transform: scale(1.1);
}

.ad-popup-overlay.closing {
    animation: adPopupFadeOut 0.3s ease forwards;
}

@keyframes adPopupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes adPopupFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes adPopupScaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 600px) {
    .ad-popup-content {
        max-width: 90vw;
    }
}

/* tombstone: :root variables moved to variables.css */
/* tombstone: header styles moved to header.css */
/* tombstone: hero & weather styles moved to hero.css */
/* tombstone: base reset and global styles moved to base.css */
/* tombstone: grid and card styles moved to cards.css */
/* tombstone: gallery and lightbox styles moved to gallery.css */
/* tombstone: radio player styles moved to player.css */
/* tombstone: contact, social and footer styles moved to contact.css */
/* tombstone: media queries moved to responsive.css */