@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #f5da48;
    --secondary-color: #f5da48;
    --dark-color: #1a1a1a;
    --light-color: #1a1a1a;
    --text-color: #fff;
    --border-color: #333;
    --success-color: #f5da48;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Oswald', sans-serif;
    background-color: var(--dark-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 70px; /* Space for sticky footer */
    font-weight: 400;
}

/* Header Styles */
header {
    background-color: var(--dark-color);
    color: var(--text-color);
    padding: 1rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--primary-color);
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.header-title:hover {
    color: var(--primary-color);
}

.header-title i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.menu-toggle:hover {
    background-color: rgba(245, 218, 72, 0.1);
}

/* Navigation Menu */
.nav-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background-color: var(--dark-color);
    box-shadow: var(--shadow-lg);
    transition: left 0.3s ease;
    z-index: 200;
    overflow-y: auto;
}

.nav-menu.active {
    left: 0;
}

.nav-header {
    background-color: var(--dark-color);
    color: var(--text-color);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--primary-color);
}

.nav-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-list {
    list-style: none;
    padding: 1rem 0;
}

.nav-item {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.nav-item:hover {
    background-color: rgba(245, 218, 72, 0.1);
}

.nav-item.active {
    background-color: rgba(245, 218, 72, 0.1);
    border-left: 4px solid var(--primary-color);
}

.nav-item i {
    width: 20px;
    color: var(--primary-color);
}

.nav-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 150;
    display: none;
}

.overlay.active {
    display: block;
}

/* Main Content */
main {
    padding: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ad Container Styles - Updated to prevent layout shifts and cropping */
.ad-container {
    width: 100%;
    height: 280px; /* Increased height to accommodate larger ads */
    margin: 2rem 0;
    display: block;
    overflow: hidden;
    position: relative;
    background-image: linear-gradient(90deg, rgba(245, 218, 72, 0.05) 0%, rgba(245, 218, 72, 0.1) 50%, rgba(245, 218, 72, 0.05) 100%);
    /* Ensure the container has explicit dimensions */
    min-width: 300px;
    max-width: 100%;
    /* Make sure the container is visible */
    visibility: visible;
    opacity: 1;
    /* Prevent layout shifts */
    contain: layout;
    /* Add transition for smooth loading */
    transition: height 0.3s ease;
    /* Ensure container has dimensions before ad loads */
    min-height: 280px; /* Increased minimum height */
    /* Add explicit display property */
    display: block;
    /* Add position property */
    position: relative;
    /* Reserve space to prevent layout shift */
    contain-intrinsic-size: 300px 250px;
    content-visibility: auto;
}

/* Loading placeholder */
.ad-loading-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    z-index: 1;
    flex-direction: column;
    gap: 0.5rem;
    /* Ensure placeholder is visible initially */
    opacity: 1;
    /* Add transition for smooth loading */
    transition: opacity 0.3s ease;
}

/* Hide placeholder when ad loads */
.ad-container.loaded .ad-loading-placeholder {
    opacity: 0;
    pointer-events: none;
}

/* Ad wrapper for dynamically loaded ads */
.ad-wrapper {
    width: 100%;
    height: 100%;
    display: block;
    /* Ensure the ad fills the container */
    min-height: 280px; /* Increased minimum height */
    min-width: 300px;
    /* Add transition for smooth loading */
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Ensure wrapper is properly sized */
    width: 100%;
    height: 100%;
    /* Add position property */
    position: absolute;
    top: 0;
    left: 0;
    /* Center the ad */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Show ad when loaded */
.ad-container.loaded .ad-wrapper {
    opacity: 1;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    /* Make ad container full width on mobile */
    .ad-container {
        height: 280px; /* Adjusted height for mobile */
        margin: 2rem 0;
        width: 100vw; /* Use full viewport width */
        min-width: 100vw; /* Ensure minimum width is full viewport */
        min-height: 280px; /* Adjusted minimum height for mobile */
        contain-intrinsic-size: 100vw 280px; /* Updated to match new dimensions */
        /* Position to go edge-to-edge */
        position: relative;
        left: 50%;
        transform: translateX(-50%);
        /* Remove overflow to allow full display */
        overflow: visible;
    }
    
    .ad-wrapper {
        min-height: 280px; /* Adjusted minimum height for mobile */
        width: 100%; /* Ensure full width */
        /* Center the ad if it's smaller than the container */
        justify-content: center;
        /* Allow ad to expand */
        max-width: none;
    }
    
    /* Ensure the ad element itself fills the container */
    .ad-wrapper ins {
        width: 100% !important;
        max-width: none !important;
        min-width: 300px !important;
        overflow: visible;
        /* Allow ad to expand horizontally */
        display: block;
    }
    
    /* Adjust main content to accommodate full-width ads */
    main {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Add padding back to other content but not to ads */
    .page > *:not(.ad-container) {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .ad-container {
        height: 280px; /* Medium height for tablets */
        width: 100%; /* Ensure full width on tablets */
        min-width: 300px;
        min-height: 280px; /* Adjusted minimum height for tablets */
        contain-intrinsic-size: 300px 220px;
        /* Add overflow handling */
        overflow-x: auto;
        /* Center the container if it's wider than the screen */
        margin-left: auto;
        margin-right: auto;
    }
    
    .ad-wrapper {
        min-height: 220px; /* Adjusted minimum height for tablets */
        width: 100%; /* Ensure full width */
        /* Center the ad if it's smaller than the container */
        justify-content: center;
    }
    
    /* Ensure the ad element itself doesn't overflow */
    .ad-wrapper ins {
        max-width: 100%;
        overflow: hidden;
    }
}

/* For larger ads that might appear */
@media (min-width: 1024px) {
    .ad-container.large {
        height: 300px; /* For larger ad formats */
        max-width: 300px;
        margin: 2rem auto;
        min-width: 300px;
        min-height: 300px; /* Adjusted minimum height for large ads */
        contain-intrinsic-size: 300px 300px;
    }
    
    .ad-container.large .ad-wrapper {
        min-height: 300px; /* Adjusted minimum height for large ads */
    }
}

/* Ad Placeholder */
.ad-placeholder {
    background-color: rgba(245, 218, 72, 0.05);
    border: 2px dashed var(--primary-color);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
    color: rgba(255, 255, 255, 0.7);
}

/* Home Page Styles */
.home-title {
    font-size: 1.5rem;
    margin-top: 3rem;
    color: var(--text-color);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.home-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(245, 218, 72, 0.2);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background-color: rgba(245, 218, 72, 0.1);
}

.category-icon {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.category-title {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 300;
}

/* Category Page Styles */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(245, 218, 72, 0.3);
    padding-bottom: 1rem;
}

.category-title {
    font-size: 1.2rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
}

.copy-all-btn {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-all-btn:hover {
    background-color: #e5c630;
}

.tag-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tag-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(245, 218, 72, 0.1);
}

.tag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tag-name {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.copy-btn {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.2s;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn:hover {
    background-color: #e5c630;
}

.copy-btn.copied {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

.tag-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 300;
}

/* Footer Styles */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 100;
    border-top: 1px solid var(--primary-color);
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
    color: var(--text-color);
    text-decoration: none;
}

.footer-item:hover {
    background-color: rgba(245, 218, 72, 0.1);
}

.footer-item.active {
    color: var(--primary-color);
}

.footer-item i {
    font-size: 1.3rem;
}

.footer-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 300;
    display: none;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--dark-color);
    border-radius: 0.5rem;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s ease;
    border: 1px solid rgba(245, 218, 72, 0.3);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(245, 218, 72, 0.3);
    padding-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    width: 24px;
    color: var(--primary-color);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-item a:hover {
    color: #e5c630;
    text-decoration: underline;
}

.social-media-section {
    margin-top: 1.5rem;
}

.social-media-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-facebook {
    background-color: #1877f2;
}

.share-twitter {
    background-color: #1da1f2;
}

.share-instagram {
    background-color: #e1306c;
}

.share-youtube {
    background-color: #ff0000;
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.bmac-btn, .digicard-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bmac-btn:hover, .digicard-btn:hover {
    background-color: #e5c630;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-color);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    box-shadow: var(--shadow-lg);
    z-index: 250;
    display: none;
    animation: toastFadeIn 0.3s ease;
    border: 1px solid var(--primary-color);
}

.toast.active {
    display: block;
}

@keyframes toastFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Content Page Styles */
.content-page {
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.content-container {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(245, 218, 72, 0.1);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Lyrics Page Styles */
.lyrics-page {
    max-width: 800px;
    margin: 0 auto;
}

.lyrics-container {
    margin-top: 1.5rem;
}

.code-box {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(245, 218, 72, 0.1);
}

.code-header {
    background-color: rgba(245, 218, 72, 0.1);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(245, 218, 72, 0.2);
}

.code-header span {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-code-btn {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.2s;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-code-btn:hover {
    background-color: #e5c630;
}

.copy-code-btn.copied {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

.code-content {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.2);
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    margin: 0;
    line-height: 1.6;
    font-size: 1rem;
    display: block;
}

/* About Page Specific Styles */
.about-section h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.about-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.about-section a:hover {
    color: #e5c630;
    text-decoration: underline;
}

.disclaimer {
    background-color: rgba(245, 218, 72, 0.1);
    border-left: 3px solid var(--primary-color);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0.25rem;
}

.bmac-section {
    margin-top: 2rem;
    text-align: center;
}

.bmac-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: var(--dark-color);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}

.bmac-link:hover {
    background-color: #e5c630;
}

.bmac-link i {
    font-size: 1.2rem;
}

/* Privacy Policy Page Specific Styles */
.privacy-section h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.privacy-section h4 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.privacy-section p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.update-date {
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.service-list {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.service-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.privacy-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.privacy-section a:hover {
    color: #e5c630;
    text-decoration: underline;
}

/* Terms & Conditions Page Specific Styles */
.terms-section h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.terms-section h4 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.terms-section p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.liability-list {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.liability-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.terms-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.terms-section a:hover {
    color: #e5c630;
    text-decoration: underline;
}

/* Scrollbar Styling */
.content-container::-webkit-scrollbar,
.code-content::-webkit-scrollbar {
    width: 8px;
}

.content-container::-webkit-scrollbar-track,
.code-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.content-container::-webkit-scrollbar-thumb,
.code-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.content-container::-webkit-scrollbar-thumb:hover,
.code-content::-webkit-scrollbar-thumb:hover {
    background: #e5c630;
}

/* Responsive Design */
@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}