/* --- Font Imports --- */
/* Attempting Google Fonts import. If these don't work on Neocities,
   you might need to remove these @import rules and rely on the fallback system fonts. */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

:root {
    /* Unified Color Palette */
    --clr-darkest-bg: #1A000A; /* Deeper, more unified dark maroon */
    --clr-dark-bg: #300018;   /* Main background for sections */
    --clr-medium-bg: #450024;  /* Slightly lighter background for main app container */
    --clr-accent-main: #800080; /* A richer, deep purple */
    --clr-accent-light: #C080D0; /* Lighter, pastel purple for highlights/text */
    --clr-text-primary: #F0E0F0; /* Off-white with a purple tint */
    --clr-border-main: #600040; /* Darker purple for main borders */
    --clr-divider-pattern-start: #C080D0; /* Light purple for pattern start */
    --clr-divider-pattern-end: #300018;   /* Dark bg for pattern end */
}

/* --- Base & Layout --- */
body {
    background-color: var(--clr-darkest-bg);
    color: var(--clr-text-primary);
    /* Fallback fonts if Google Fonts don't load */
    font-family: 'Inter', sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

#app {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    border: 3px solid var(--clr-border-main);
    background-color: var(--clr-medium-bg);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7), 0 0 10px var(--clr-accent-main);
    border-radius: 8px; /* Slightly rounded corners for chunkiness */
}

/* --- Typography --- */
header h1 {
    /* Fallback fonts if Google Fonts don't load */
    font-family: 'Cinzel', serif, Georgia, "Times New Roman", Times, serif;
    font-size: 3.5rem;
    text-align: center;
    color: var(--clr-accent-light); /* Lighter purple for title */
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 15px var(--clr-accent-main);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

header p {
    text-align: center;
    color: var(--clr-accent-main);
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 40px;
    font-style: italic;
}

h2, h3, h4 {
    /* Fallback fonts if Google Fonts don't load */
    font-family: 'Cinzel', serif, Georgia, "Times New Roman", Times, serif;
    color: var(--clr-accent-light);
    border-bottom: 2px solid var(--clr-border-main); /* Solid lines for headers */
    padding-bottom: 5px;
    margin-top: 35px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --- Cute Dividers (Section Separators) --- */
section:not(:first-child) {
    padding-top: 40px;
    margin-top: 40px;
    position: relative;
}

section:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 6px; /* Chunky divider */
    background: repeating-linear-gradient(
        45deg,
        var(--clr-divider-pattern-start),
        var(--clr-divider-pattern-start) 10px,
        var(--clr-divider-pattern-end) 10px,
        var(--clr-divider-pattern-end) 20px
    );
    border-radius: 4px; /* Soft rounded edges */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
}

/* --- News Section Styling --- */
section:nth-of-type(1) > div {
    background-color: var(--clr-dark-bg);
    padding: 20px;
    border: 1px solid var(--clr-accent-main);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5), 0 0 15px var(--clr-accent-main);
    border-radius: 5px;
}
section:nth-of-type(1) strong {
    color: var(--clr-accent-light);
}

/* --- Admin Section (Grid Layout) --- */
section:nth-of-type(2) > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* slightly wider cards */
    gap: 25px; /* more gap for chunkiness */
    margin-top: 25px;
}

section:nth-of-type(2) > div > div {
    background-color: var(--clr-dark-bg);
    padding: 25px;
    border: 2px solid var(--clr-accent-light);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), 0 0 8px var(--clr-accent-light);
    border-radius: 8px;
    text-align: center;
}
section:nth-of-type(2) > div > div h3 {
    border-bottom: none;
    margin-top: 0;
    color: var(--clr-accent-light);
}
section:nth-of-type(2) > div > div p {
    font-style: italic;
    color: var(--clr-accent-main);
    margin-top: -10px;
    margin-bottom: 15px;
}
section:nth-of-type(2) > div > div ul {
    list-style: none; /* Remove default bullets for admin lists */
    padding: 0;
    margin: 0;
}
section:nth-of-type(2) > div > div ul li {
    background-color: var(--clr-darkest-bg);
    padding: 8px;
    margin-bottom: 5px;
    border: 1px dashed var(--clr-border-main);
    border-radius: 3px;
    color: var(--clr-text-primary);
}


/* --- Form and Button Styling (Ask the Admin) --- */
section:nth-of-type(3) {
    background-color: var(--clr-dark-bg);
    padding: 30px;
    border: 2px solid var(--clr-accent-main);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7), 0 0 10px var(--clr-accent-main);
    border-radius: 8px;
    text-align: center; /* Center the form elements */
}
section:nth-of-type(3) > div {
    display: flex; /* Make input and button side-by-side */
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

#admin-question {
    flex-grow: 1; /* Allows input to take up available space */
    padding: 12px;
    background-color: var(--clr-darkest-bg);
    color: var(--clr-text-primary);
    border: 1px solid var(--clr-accent-light);
    box-sizing: border-box;
    font-size: 1rem;
    border-radius: 4px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.4);
}

#ask-button {
    flex-shrink: 0; /* Prevents button from shrinking */
    padding: 12px 25px;
    background-color: var(--clr-accent-main);
    color: var(--clr-text-primary);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: 'Cinzel', serif;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

#ask-button:hover:not(:disabled) {
    background-color: var(--clr-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

#ask-button:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

#admin-response-container {
    margin-top: 25px;
    padding: 20px;
    border: 1px dashed var(--clr-accent-light);
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    text-align: left;
}
#admin-response-container p {
    font-style: italic;
    color: var(--clr-text-primary);
}

/* --- Loading Spinner Animation --- */
@keyframes spin {
    to { transform: rotate(360deg); }
}
#loading-indicator svg {
    animation: spin 1s linear infinite;
    width: 24px; /* Slightly larger spinner */
    height: 24px;
    color: var(--clr-accent-light);
    fill: currentColor; /* Ensure SVG paths use the text color */
}
#loading-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--clr-accent-light);
    font-style: italic;
    font-size: 1.1em;
}
.hidden { display: none !important; }

/* --- Media Section Layout --- */
section:nth-of-type(4) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; /* More space between media items */
    margin-top: 30px;
}
section:nth-of-type(4) > div {
    background-color: var(--clr-dark-bg);
    padding: 20px;
    border: 2px solid var(--clr-border-main);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    text-align: center;
}
section:nth-of-type(4) img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 15px auto; /* Center image and add bottom margin */
    border: 3px solid var(--clr-accent-main);
    border-radius: 5px;
    box-shadow: 0 0 10px var(--clr-accent-main);
    transition: transform 0.3s ease;
}
section:nth-of-type(4) img:hover {
    transform: scale(1.02);
}


/* Responsive iframe for video */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border: 3px solid var(--clr-accent-main);
    box-shadow: 0 0 10px var(--clr-accent-main);
    border-radius: 5px;
    margin-bottom: 15px;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Social Media Links Layout --- */
section:nth-of-type(5) {
    text-align: center;
}
section:nth-of-type(5) > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* More space between buttons */
    margin-top: 25px;
}

section:nth-of-type(5) a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: var(--clr-accent-main);
    color: var(--clr-text-primary);
    text-decoration: none;
    border: 2px solid var(--clr-accent-light);
    border-radius: 30px; /* Pill shape */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
    font-size: 1.05rem;
    font-weight: bold;
}

section:nth-of-type(5) a:hover {
    background-color: var(--clr-accent-light);
    color: var(--clr-darkest-bg); /* Dark text on hover for contrast */
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.7);
}
section:nth-of-type(5) a span:first-child {
    font-size: 1.5em; /* Larger emoji icons */
}

/* --- Global Elements --- */
a {
    color: var(--clr-accent-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: disc;
    padding-left: 20px;
}

p strong {
    color: var(--clr-accent-light);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.8rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    body {
        padding: 10px;
    }
    #app {
        padding: 10px;
    }
    section:nth-of-type(3) > div {
        flex-direction: column;
    }
    #ask-button {
        width: auto; /* Revert to auto width on small screens */
    }
}
