/* --- Base Mobile & Desktop Rules --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    
    /* Dark Theme Palette (Deep charcoal and soft purple) */
    color: #e0dcf0; 
    background-color: #121016; 
    /* Centering Rules */
    text-align: center; 
}
/* Ensure list bullets or text blocks center nicely */
ul {
    list-style-position: inside;
    padding-left: 0;
}

h1, h2, h3 {
    color: #f1edff;
    margin-top: 1.5em;
}

h1 {
    border-bottom: 2px solid #3a2d54;
    padding-bottom: 10px;
}

a {
    color: #b19ffb; /* Soft light purple for links */
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #d1c7ff;
    text-decoration: underline;
}

hr {
    border: 0;
    border-top: 1px solid #3a2d54;
    margin: 2em 0;
}

/* --- Responsive Button Grid --- */
.button-grid {
    display: grid;
    /* repeat(auto-fit...) automatically drops items to a new row on small mobile screens */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.btn {
    display: block;
    padding: 16px;
    background: #1e1a26; /* Slightly lighter purple-gray for depth */
    border: 1px solid #3a2d54;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: #d1c7ff !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

/* Accessible, finger-friendly hover state */
.btn:hover {
    background: #4c3775; /* Vivid soft purple fill on hover */
    color: #ffffff !important;
    border-color: #7657b0;
    transform: translateY(-2px); /* Subtle lift effect */
    text-decoration: none;
}

/* --- Mobile Specific Optimization --- */
@media (max-width: 600px) {
    body {
        margin: 20px auto; /* Tighter margins on small screens */
    }
    
    .btn {
        padding: 18px; /* Slightly larger buttons for easier thumb-tapping */
        font-size: 1.1rem;
    }
}

/* --- Image Gallery Row --- */
.image-gallery {
    display: flex;
    flex-direction: row;       /* Places items side-by-side */
    justify-content: center;   /* Centers the group horizontally */
    align-items: center;       /* Vertically aligns images if they have different heights */
    gap: 30px;                 /* Adjust this number to add more or less horizontal separation */
    margin: 25px 0;
    width: 100%;
}

.image-gallery img {
    max-width: 100%;           /* Prevents images from bleeding past the screen edge */
    height: auto;              /* Maintains original aspect ratio */
    border-radius: 8px;        /* Optional: gives the images nice rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Optional: blends them into the dark theme */
}

/* --- Mobile Responsiveness --- */
@media (max-width: 600px) {
    .image-gallery {
        flex-direction: column; /* Stacks them vertically on small phones so they don't squish */
        gap: 20px;              /* Vertically separates them on mobile */
    }
}
/* --- Audio Player Styling --- */
audio {
    width: 100%;
    max-width: 400px;
    margin: 15px 0;
    /* filter: invert(90%) hue-rotate(180deg);  Modern CSS trick to turn white players dark/purple */
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

audio:hover {
    opacity: 1;
}

/* --- Pure CSS Snow Effect --- */
body {
    /* Layer multiple transparent dot patterns to look like different depths of snow */
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.4) 1.5px, transparent 1.5px),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.5) 1.2px, transparent 1.2px);
    
    /* Size of the pattern grid before it repeats */
    background-size: 500px 500px, 400px 400px, 600px 600px;
    
    /* Call the animation defined below */
    animation: snowfall 25s linear infinite;
}

/* The math behind making the dots slide downward seamlessly */
@keyframes snowfall {
    0% {
        background-position: 0px 0px, 0px 0px, 0px 0px;
    }
    100% {
        /* Moving the y-axis (second number) drops the snow down the screen */
        background-position: 500px 500px, 400px 800px, -600px 1200px;
    }
}

/* Reduce motion or disable snow if a phone/laptop has "Reduce Motion" enabled for accessibility */
@media (prefers-reduced-motion: reduce) {
    body {
        animation: none;
    }
}
