/* Basic Reset & Dynamic Hero Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #27AE60; /* Even brighter green */
    --secondary-green: #2ECC71; /* Vibrant accent green */
    --container-dark-bg: #2C3E50; /* Dark slate blue/grey */
    --container-darker-bg: #212F3C; /* Slightly darker for depth */
    --text-light-primary: #ECF0F1; /* Light grey/white */
    --text-light-secondary: #BDC3C7; /* Slightly dimmer light text */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.7;
    color: var(--text-light-primary); /* Default text light for dark theme */
    /* Background Image Placeholder - Replace url() with your image */
    background: linear-gradient(rgba(26, 93, 42, 0.6), rgba(26, 93, 42, 0.8)), url('https://images.unsplash.com/photo-1445964047600-cdbdb873673d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wzNjA0MTB8MHwxfHNlYXJjaHw4fHxncmVlbiUyMGxlYXZlc3xlbnwwfHx8fDE3MTQ2NjAwMDB8MA&ixlib=rb-4.0.3&q=80&w=1080') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex; /* Use flex to help center container if needed */
    flex-direction: column; /* Stack header, main, footer */
    align-items: center; /* Center container horizontally */
    padding: 0; /* Remove body padding */
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

.page-wrapper {
    width: 100%;
    max-width: 900px; /* Slightly narrower focus */
    margin: 0 auto; /* Center the wrapper */
    padding: 20px; /* Add some padding around */
}

/* --- Artist Header --- */
header {
    position: relative; /* Needed for absolute positioning of image */
    text-align: center; /* Center the text block */
    padding: 40px 20px; /* Adjust padding */
    margin-bottom: 60px; /* Increased bottom margin to push container down */
    border-bottom: none; /* Remove border */
    /* Removed animation for now */
}

.artist-image {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -50px; /* Pull image down to overlap */
    z-index: 10; /* Ensure image is above container */
    width: 150px; /* Adjust size as needed */
    height: 150px;
    border-radius: 50%; /* Circular image */
    object-fit: cover; /* Ensure image covers the area */
    border: 3px solid var(--primary-green);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); /* Slightly stronger shadow */
}

.artist-info {
    text-align: center; /* Center the text */
    margin-bottom: 80px; /* Add space below text before overlapping image */
}

/* Main Title (Song Name) */
h1 {
    font-family: 'Oswald', sans-serif; /* Still use Oswald for name */
    font-weight: 700;
    color: var(--secondary-green); /* Use vibrant green */
    font-size: 4em; /* Make it large again */
    line-height: 1.1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4); /* Subtle shadow */
    margin: 0 0 5px 0;
}

/* Artist Subhead */
.artist-subhead {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1em;
    font-weight: 400;
    color: var(--text-light-secondary);
    margin: 0;
}

/* --- Main Content Container --- */
.container {
    /* Add subtle noise texture */
    background-color: var(--container-dark-bg);
    padding: 80px 60px 50px 60px; /* Increased top padding for image overlap */
    border-radius: 8px; /* Subtle rounding */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 800px; /* Limit container width */
    margin: 0 auto 40px auto; /* Center container and add bottom margin */
    border: none; /* Remove previous border */
    position: relative; /* Needed for absolute positioning or pseudo-elements if clip-path wasn't used */
    clip-path: none; /* Remove the angled bottom edge */
    animation: fadeInUp 1s 0.3s ease-out backwards; /* Fade-up animation, delayed */
}

main {
    padding-top: 0; /* Remove extra padding, header is now separate */
}

main h2 {
    font-family: 'Montserrat', sans-serif; /* Consistent sans-serif */
    font-weight: 600;
    color: var(--secondary-green); /* Use vibrant accent */
    margin-bottom: 25px;
    font-size: 1.8em;
    border-bottom: 2px solid var(--secondary-green);
    display: inline-block;
    padding-bottom: 8px;
}

/* Audio Player */
.audio-player {
    margin-bottom: 50px;
    text-align: center;
    padding: 30px;
    background-color: var(--container-darker-bg); /* Slightly darker shade */
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle light border */
    transition: box-shadow 0.3s ease-in-out; /* Add transition for hover */
}

.audio-player:hover {
    box-shadow: 0 6px 15px rgba(39, 174, 96, 0.3); /* Use accent green shadow */
}

audio {
    width: 100%;
    margin-top: 15px;
    filter: none;
    border-radius: 5px; /* Less pronounced rounding */
    box-shadow: none; /* Remove shadow */
}

/* Remove custom audio controls for simplicity/compatibility */
audio::-webkit-media-controls-panel,
audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-volume-slider {
  /* Reset to browser defaults */
  background-color: initial;
  border-radius: initial;
  box-shadow: initial;
}

/* Lyrics */
.lyrics {
    margin-bottom: 50px;
}

.lyrics pre {
    background-color: var(--container-darker-bg); /* Match audio player bg */
    padding: 30px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-light-secondary); /* Slightly dimmer light text for lyrics */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle light border */
    line-height: 1.7;
    box-shadow: none; /* Remove inner shadow */
}

/* Footer */
footer {
    text-align: center;
    margin: 0 auto; /* Center footer */
    padding: 20px; /* Added padding */
    border-top: none; /* Remove top border inside container */
    font-size: 0.9em;
    /* Footer outside the clipped container */
    width: 100%;
    max-width: 900px; /* Match page-wrapper */
    color: #e0e0e0; /* Light color for footer text on dark background */
    background-color: rgba(0,0,0,0.4); /* Darker footer background */
    border-radius: 0 0 8px 8px; /* Match bottom rounding if needed */
}

/* --- Animations --- */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive Adjustments */
@media (max-width: 900px) {
    .page-wrapper {
        max-width: 100%;
        padding: 15px;
    }
    .container {
        padding: 40px 30px 60px 30px;
        margin-left: 0;
        margin-right: 0;
    }
    header {
        flex-direction: column; /* Stack image and text */
        text-align: center;
        gap: 15px;
        padding: 30px 15px;
    }
    .artist-image {
        width: 120px;
        height: 120px;
        bottom: -40px; /* Adjust overlap */
    }
    .artist-info {
        text-align: center;
        margin-bottom: 60px; /* Adjust spacing */
    }
    h1 {
        font-size: 3.2em;
    }
    main h2 {
        font-size: 1.6em;
    }
}

@media (max-width: 600px) {
    .page-wrapper {
        padding: 10px;
    }
    .container {
        padding: 30px 20px 50px 20px;
        border-radius: 0; /* Full width on small screens */
    }
    header {
        padding: 30px 15px 20px 15px; /* Adjust padding */
        margin-bottom: 50px; /* Adjust margin */
    }
    .artist-image {
        width: 100px;
        height: 100px;
        bottom: -35px; /* Adjust overlap */
    }
    .artist-info {
        margin-bottom: 50px; /* Adjust spacing */
    }
    h1 {
        font-size: 2.5em;
    }
    main h2 {
        font-size: 1.4em;
    }
    .lyrics pre {
        padding: 20px;
        font-size: 0.95em;
    }
    footer {
        padding: 15px;
        border-radius: 0;
    }
}

.song-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.song-link {
    background: none !important;
    border: 2px solid var(--primary-green) !important;
    color: var(--primary-green) !important;
    padding: 10px 20px;
    margin: 0;
    text-decoration: none !important;
    font-family: 'Oswald', sans-serif;
    font-size: 1.2em;
    transition: all 0.3s ease;
    border-radius: 4px;
    display: inline-block;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-align: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    -webkit-text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

.song-link.active, .song-link:hover {
    background: var(--primary-green) !important;
    color: var(--text-light-primary) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    text-decoration: none !important;
}

.song-link:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.song-link:focus {
    outline: 2px solid var(--secondary-green);
    outline-offset: 2px;
}

.song-content {
    display: none;
}

.song-content.active {
    display: block;
}

.get-involved {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.challenge {
    flex: 1;
    text-align: center;
    background-color: var(--container-darker-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.challenge h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5em;
    color: var(--secondary-green);
    margin-bottom: 20px;
}

.challenge img {
    width: 150px; /* Explicit width for visibility */
    height: 150px; /* Explicit height for visibility */
    object-fit: contain; /* Ensure the whole image is visible */
    border-radius: 8px;
    margin-bottom: 20px;
}

.challenge p {
    color: var(--text-light-secondary);
    margin-bottom: 20px;
}

.challenge .btn {
    display: inline-block;
    background-color: var(--primary-green);
    color: var(--text-light-primary);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.challenge .btn:hover {
    background-color: var(--secondary-green);
}

@media (max-width: 768px) {
    .get-involved {
        flex-direction: column;
    }
    
    .song-selector {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .song-link {
        width: 100%;
        max-width: 300px;
        font-size: 1.1em;
        padding: 12px 20px;
    }
}

/* Instagram browser and WebKit specific fixes */
@media (max-width: 600px) {
    .song-link {
        min-height: 44px; /* Minimum touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* iOS Safari specific link overrides with absolute values */
div.song-selector a.song-link {
    color: #27AE60 !important;
    text-decoration: none !important;
    background: transparent !important;
    border: 2px solid #27AE60 !important;
    font-family: 'Oswald', sans-serif !important;
    font-size: 1.2em !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    display: inline-block !important;
    -webkit-appearance: none !important;
    -webkit-text-decoration-line: none !important;
}

div.song-selector a.song-link:visited {
    color: #27AE60 !important;
    text-decoration: none !important;
    -webkit-text-decoration-line: none !important;
}

div.song-selector a.song-link:link {
    color: #27AE60 !important;
    text-decoration: none !important;
    -webkit-text-decoration-line: none !important;
}

div.song-selector a.song-link.active {
    background: #27AE60 !important;
    color: #ECF0F1 !important;
    text-decoration: none !important;
    -webkit-text-decoration-line: none !important;
}

div.song-selector a.song-link:hover {
    background: #27AE60 !important;
    color: #ECF0F1 !important;
    text-decoration: none !important;
    -webkit-text-decoration-line: none !important;
}

/* Fix for Instagram browser viewport issues */
@supports (-webkit-touch-callout: none) {
    .page-wrapper {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}
