/**
 * Smartlink Template Styles
 * Mobile-first Landing Page for Songs
 * Separate CSS file for clean code structure
 */

/* ============================================
   BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
}

/* ============================================
   DARK MODE (default)
   ============================================ */
body.theme-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #fff;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   LIGHT MODE
   ============================================ */
body.theme-light {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #1a1a1a;
}

/* ============================================
   PARTICLES BACKGROUND
   ============================================ */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    animation: floatParticle 20s linear infinite;
}

body.theme-light .particle {
    background: rgba(255, 107, 53, 0.2);
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   CONTAINER
   ============================================ */
.smartlink-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================
   COVER IMAGE
   ============================================ */
.cover-wrapper {
    width: 320px;
    height: 320px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-placeholder svg {
    width: 80px;
    height: 80px;
    fill: rgba(255, 255, 255, 0.8);
}

/* Audio Player Overlay */
.cover-wrapper.has-audio {
    cursor: pointer;
    position: relative;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cover-wrapper.has-audio:hover .play-overlay {
    background: rgba(255, 107, 53, 0.7);
    transform: translate(-50%, -50%) scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.cover-wrapper.is-playing .play-overlay {
    background: rgba(255, 107, 53, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
}

.play-icon, .pause-icon {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.play-icon svg, .pause-icon svg {
    width: 35px;
    height: 35px;
    display: block;
}

/* Play icon triangle needs slight offset to appear visually centered */
.play-icon svg {
    margin-left: 3px;
}

/* Progress Ring */
.progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.cover-wrapper.is-playing .progress-ring {
    opacity: 1;
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 4;
}

.progress-ring-circle {
    fill: none;
    stroke: #ff6b35;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 628.32;
    stroke-dashoffset: 628.32;
    transition: stroke-dashoffset 0.1s linear;
}

/* ============================================
   SONG INFO
   ============================================ */
.song-info {
    text-align: center;
    margin-bottom: 30px;
}

.song-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: #fff; /* Default for dark theme */
}

/* Dark theme - white text */
body.theme-dark .song-title {
    color: #fff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.theme-dark .artist-name {
    color: rgba(255, 255, 255, 0.7) !important;
}

.artist-name {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.artist-name:hover {
    color: #ff6b35;
}

/* ============================================
   PLATFORM BUTTONS
   ============================================ */
.platforms {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.platform-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.platform-btn:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.platform-btn:active {
    transform: scale(0.98);
}

.platform-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    flex-grow: 0;
    background: var(--platform-color, #666);
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.platform-btn:hover .platform-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.platform-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.platform-name {
    flex: 1;
}

.platform-arrow {
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}

.platform-btn:hover .platform-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* ============================================
   ACTION BUTTONS (Künstler anzeigen, Website besuchen)
   ============================================ */
.artist-links,
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 40px auto 0;
    flex-wrap: wrap;
}

.artist-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.artist-link-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
    color: #fff;
}

.artist-link-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ============================================
   SHARE SECTION
   ============================================ */
.share-section {
    width: 90%;
    max-width: 550px;
    margin: 50px auto 0;
    padding: 0 20px;
    text-align: center;
}

.share-section > p,
.share-label {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 18px;
}

.share-section .share-buttons {
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}

.share-btn,
button.share-btn,
a.share-btn {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

.share-btn svg,
button.share-btn svg,
a.share-btn svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
    margin: 0 auto !important;
}

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.theme-light .share-btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ============================================
   LEGAL FOOTER
   ============================================ */
.legal-footer {
    width: 90%;
    max-width: 550px;
    margin: 60px auto 0;
    padding: 40px 30px 50px;
    text-align: center;
}

/* ISRC Display */
.isrc-display {
    margin-bottom: 25px;
    font-size: 11px;
    opacity: 0.5;
}

.isrc-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.isrc-code {
    font-family: 'Monaco', 'Consolas', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    margin-left: 5px;
}

body.theme-light .isrc-code {
    background: rgba(0, 0, 0, 0.05);
}

/* Legal Links (Datenschutz, Impressum, AGB) */
.legal-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.legal-links a {
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.legal-links a:hover {
    opacity: 1;
}

/* Copyright text */
.copyright-text {
    margin-top: 30px;
    font-size: 13px;
    opacity: 0.5;
}

.copyright-text a {
    color: inherit;
    text-decoration: none;
}

/* Branding */
.branding {
    margin-top: auto;
    padding-top: 40px;
    padding-bottom: 30px;
    text-align: center;
}

.branding a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.branding a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   LIGHT MODE OVERRIDES
   ============================================ */
body.theme-light .cover-wrapper {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Light theme - dark text */
body.theme-light .song-title {
    color: #1a1a1a !important;
    text-shadow: none !important;
}

body.theme-light .artist-name {
    color: rgba(0, 0, 0, 0.6) !important;
}

body.theme-light .artist-name:hover {
    color: #ff6b35;
}

body.theme-light .platform-btn {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.theme-light .platform-btn:hover {
    background: #fff;
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.theme-light .more-link {
    border-color: rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.6);
}

body.theme-light .more-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

body.theme-light .branding a {
    color: rgba(0, 0, 0, 0.4);
}

body.theme-light .branding a:hover {
    color: rgba(0, 0, 0, 0.7);
}

body.theme-light .artist-link-btn {
    background: #fff;
    border-color: #e5e7eb;
    color: #666;
}

body.theme-light .artist-link-btn:hover {
    background: #fff8f5;
    border-color: #ff6b35;
    color: #ff6b35;
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.theme-toggle,
button.theme-toggle {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    transition: all 0.3s ease !important;
    z-index: 100 !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

body.theme-dark .theme-toggle {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

body.theme-dark .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

body.theme-light .theme-toggle {
    background: #fff !important;
    color: #1a1a1a !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

body.theme-light .theme-toggle:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

/* Theme-Icon Visibility - Dark theme shows sun (to switch to light) */
body.theme-dark .theme-icon-light {
    display: none !important;
}

body.theme-dark .theme-icon-dark {
    display: flex !important;
    color: #fbbf24 !important; /* Gold/Yellow for sun */
}

/* Light theme shows moon (to switch to dark) */
body.theme-light .theme-icon-dark {
    display: none !important;
}

body.theme-light .theme-icon-light {
    display: flex !important;
    color: #6366f1 !important; /* Indigo for moon */
}

/* ============================================
   COUNTDOWN STYLES
   ============================================ */
.countdown-wrapper {
    text-align: center;
    margin: 20px 0 30px;
}

.countdown-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    margin-bottom: 15px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.countdown-item {
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    min-width: 70px;
}

body.theme-light .countdown-item {
    background: #fff;
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.countdown-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ff6b35;
    line-height: 1;
}

.countdown-unit {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-top: 5px;
}

.pre-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #ff6b35, #e55a2b);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    margin-top: 20px;
}

.pre-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.platforms-preview {
    opacity: 0.5;
}

.platforms-preview .platform-btn {
    pointer-events: none;
}

.coming-soon-badge {
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: inline-block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 380px) {
    .cover-wrapper {
        width: 220px;
        height: 220px;
    }

    .song-title {
        font-size: 1.4rem;
    }

    .platform-btn {
        padding: 14px 16px;
    }
    
    .countdown-item {
        padding: 10px 12px;
        min-width: 55px;
    }
    
    .countdown-number {
        font-size: 1.5rem;
    }
    
    .legal-links {
        gap: 25px;
    }
}

