/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --christmas-red: #C41E3A;
    --christmas-green: #165B33;
    --christmas-gold: #FFD700;
    --snow-white: #FFFAFA;
    --dark-green: #0F4229;
    --light-red: #F45B69;
    --light-green: #2D8659;
    --gradient-1: linear-gradient(135deg, #C41E3A 0%, #165B33 100%);
    --gradient-2: linear-gradient(135deg, #165B33 0%, #0F4229 100%);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gradient-1);
    color: #333;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Snowflakes Animation */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5em;
    animation: fall linear infinite;
}

.snowflake:nth-child(1) { left: 10%; animation-duration: 10s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 1s; font-size: 1.2em; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 8s; animation-delay: 2s; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 14s; animation-delay: 0.5s; font-size: 1.8em; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 1.5s; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 9s; animation-delay: 3s; font-size: 1.4em; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 13s; animation-delay: 2.5s; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 10s; animation-delay: 1s; font-size: 1.6em; }
.snowflake:nth-child(9) { left: 90%; animation-duration: 12s; animation-delay: 0s; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 11s; animation-delay: 2s; font-size: 1.3em; }

@keyframes fall {
    to {
        transform: translateY(110vh);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.santa-hat {
    font-size: 4em;
    margin-bottom: -20px;
    animation: swing 2s ease-in-out infinite;
}

@keyframes swing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.title {
    font-family: 'Mountains of Christmas', cursive;
    font-size: 3em;
    color: var(--snow-white);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3),
                 0 0 20px rgba(255, 215, 0, 0.5);
    margin: 20px 0;
    line-height: 1.2;
}

.title-emoji {
    display: inline-block;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.subtitle {
    font-size: 1.2em;
    color: var(--snow-white);
    font-weight: 300;
}

/* AdSense Banners */
.adsense-banner {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: var(--shadow-md);
    min-height: 100px;
}

.adsense-placeholder {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-family: 'Mountains of Christmas', cursive;
    font-size: 2em;
    color: var(--christmas-green);
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-direction: column;
}

.mood-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 0.5em;
    color: #666;
    font-weight: 300;
    margin-top: 5px;
}

.emoji {
    font-size: 1.2em;
}

/* Platform Selection */
.platform-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.platform-btn {
    background: white;
    border: 3px solid var(--christmas-green);
    border-radius: 15px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--christmas-green);
}

.platform-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--christmas-red);
    color: var(--christmas-red);
}

.platform-btn.active {
    background: var(--gradient-2);
    color: white;
    border-color: var(--christmas-gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.platform-icon {
    width: 60px;
    height: 60px;
}

/* Mood Selection */
.mood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mood-btn {
    background: white;
    border: 2px solid var(--light-green);
    border-radius: 12px;
    padding: 25px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.mood-emoji {
    font-size: 3em;
}

.mood-name {
    font-weight: 600;
    font-size: 1.1em;
    color: var(--dark-green);
}

.mood-desc {
    font-size: 0.85em;
    color: #666;
    font-weight: 300;
}

.mood-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
    border-color: var(--christmas-red);
}

.mood-btn.selected {
    background: var(--gradient-2);
    color: white;
    border-color: var(--christmas-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.mood-btn.selected .mood-name,
.mood-btn.selected .mood-desc {
    color: white;
}

/* Generate Button */
.generate-btn {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px 40px;
    font-size: 1.3em;
    font-weight: 600;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.generate-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2em;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(196, 30, 58, 0.2);
    border-top-color: var(--christmas-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    font-size: 1.2em;
    color: var(--christmas-green);
    font-weight: 600;
}

/* Results Section */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.playlist-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.playlist-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--christmas-gold);
}

.playlist-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid var(--christmas-green);
}

.playlist-info {
    padding: 20px;
}

.playlist-name {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--dark-green);
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85em;
    color: #888;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.play-btn {
    width: 100%;
    padding: 12px;
    background: var(--gradient-2);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(22, 91, 51, 0.4);
}

.play-btn.spotify {
    background: linear-gradient(135deg, #1DB954 0%, #1ed760 100%);
}

.play-btn.spotify:hover {
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.4);
}

.play-btn.deezer {
    background: linear-gradient(135deg, #FF0092 0%, #FF5C00 100%);
}

.play-btn.deezer:hover {
    box-shadow: 0 4px 15px rgba(255, 0, 146, 0.4);
}

/* Reset Button */
.reset-btn {
    display: block;
    margin: 0 auto;
    padding: 15px 40px;
    background: white;
    border: 2px solid var(--christmas-green);
    border-radius: 25px;
    color: var(--christmas-green);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.reset-btn:hover {
    background: var(--christmas-green);
    color: white;
    transform: scale(1.05);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--snow-white);
    font-size: 1.1em;
}

.footer-note {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .title {
        font-size: 2em;
    }

    .main-content {
        padding: 25px 20px;
    }

    .section-title {
        font-size: 1.5em;
    }

    .mood-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .mood-btn {
        padding: 20px 10px;
    }

    .mood-emoji {
        font-size: 2.5em;
    }

    .playlists-grid {
        grid-template-columns: 1fr;
    }

    .generate-btn {
        font-size: 1.1em;
        padding: 18px 30px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.6em;
    }

    .subtitle {
        font-size: 1em;
    }

    .platform-buttons {
        grid-template-columns: 1fr;
    }

    .mood-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 0.6s ease;
}

.playlist-card {
    animation: fadeIn 0.6s ease;
    animation-fill-mode: both;
}

.playlist-card:nth-child(1) { animation-delay: 0.1s; }
.playlist-card:nth-child(2) { animation-delay: 0.2s; }
.playlist-card:nth-child(3) { animation-delay: 0.3s; }
.playlist-card:nth-child(4) { animation-delay: 0.4s; }
.playlist-card:nth-child(5) { animation-delay: 0.5s; }
.playlist-card:nth-child(6) { animation-delay: 0.6s; }

/* Adsterra native banner responsive wrapper */
/*.native-ad-wrapper {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .native-ad-wrapper {
        max-width: 728px;
    }
}*/
.native-ad-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .native-ad-wrapper {
        max-width: 320px;
    }
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 80px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: white;
    margin: auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 650px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: fadeInModal 0.3s ease;
}

.modal-large {
    max-width: 900px;
}

.close-modal {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: #444;
}

.modal-text p {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* Footer links */
.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: var(--snow-white);
    text-decoration: underline;
    cursor: pointer;
}

.footer-separator {
    margin: 0 10px;
    color: var(--snow-white);
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}



