/* Remove default browser styles. */
body, html {
    height: 100%; /* Ensure body fills viewport. */
    margin: 0; 
    font-family: 'Arial', sans-serif; 
    background: linear-gradient(135deg, #5C258D, #4389A2); 
    color: #fff; 
    text-align: center; 
}

/* Container for the app */
#appContainer {
    max-width: 800px; /* Restrict width for readability on large screens. */
    margin: 20px auto; 
    padding: 20px; 
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent black background. */
    border-radius: 10px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); 
}

/* Headings */
h1, h2 {
    font-weight: 300; 
    margin-bottom: 15px; 
}

/* Weather Section */
#weather {
    margin-top: 20px; /* Add space between sections. */
    background: rgba(255, 255, 255, 0.2); /* Semi-transparent for separation. */
    padding: 15px; 
    border-radius: 8px; 
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3); 
    animation: fadeIn 0.5s ease-in-out; /* Entrance animation. */
}

/* Styles for text inside weather section. */
#weather p {
    font-size: 18px; 
    margin: 10px 0; 
}

/* Music Section */
/* Similar styling to the weather section for visual consistency. */
#music {
    margin-top: 20px; 
    background: rgba(255, 255, 255, 0.2); /* Match weather section's style. */
    padding: 15px; 
    border-radius: 8px; 
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3); /* Inner shadow for consistency. */
    animation: fadeIn 0.5s ease-in-out; /* Entrance like weather section. */
}

/* Styling for long URLs or text in the music section. */
/* These fixes prevent text from overflowing the container. */
#music a {
    word-wrap: break-word; /* Break long URLs to fit inside container. */
    overflow: hidden; /* Hide content that overflows parent container. */
    text-overflow: ellipsis; /* Adds "..." when text overflows. */
    display: inline-block; /* Ensure inline text behaves properly. */
    max-width: 100%; /* Ensure links don’t exceed their container. */
    white-space: nowrap; /* Prevent wrapping unless overridden. */
}

/* Fade-in animation for weather and music sections. */
@keyframes fadeIn {
    from {
        opacity: 0; /* Starts transparent. */
        transform: translateY(20px); /* Starts slightly offset. */
    }
    to {
        opacity: 1; /* Ends fully visible. */
        transform: translateY(0); /* Ends in correct position. */
    }
}

/* Audio player styles */
/* Ensure the audio player spans width of its container. */
audio {
    width: 100%; /* Full width. */
    margin-top: 10px;
}

/* Button Styling */
button {
    background-color: #4389A2; /* Match the gradient colors for consistency. */
    color: #fff;
    padding: 10px 20px; 
    margin: 10px; 
    border: none; /* Remove default borders. */
    border-radius: 5px; 
    cursor: pointer; /* Pointer cursor. */
    transition: background-color 0.3s ease, transform 0.3s ease; 
    font-size: 16px; 
}

/* Button hover effect */
button:hover {
    background-color: #5C258D; 
    transform: scale(1.1); 
}

/* Disabled button styling */
button:disabled {
    background-color: #444;
    cursor: not-allowed; 
}

/* Loading Message */
#loading {
    display: none; /* Hidden by default. */
    font-size: 18px;
    margin: 15px 0; 
}

/* Input Field */
#location {
    padding: 10px; 
    font-size: 16px; 
    width: calc(100% - 24px); /* Full-width input with padding compensation. */
    margin-bottom: 20px; 
    border: 1px solid #ccc;
    border-radius: 5px; 
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2); 
}

/* Links */
a {
    color: #FFD700; 
    text-decoration: none; /* Remove underlines. */
    font-weight: bold; 
}

/* Hover effect for links */
a:hover {
    color: #FFFFFF; 
    text-decoration: underline; 
}
