:root {
    --background-color: #CCCCCC; /* Lighter Gray (80%) */
    --text-color: #000000; /* Dark gray for text */
    --button-bg-color: #808080; /* 50% Gray */
    --button-text-color: #ffffff;
    --footer-text-color: #666666; /* Darker gray for footer */
    --font-body: 'Montserrat', sans-serif;
}

html {
    box-sizing: border-box;
    font-size: 16px;
    background-color: var(--background-color); /* Moved from body to ensure logo visibility */
}

*, *:before, *:after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    /* background-color moved to html */
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Conflicting display properties removed to fix layout bugs */
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    inset: 0; /* a shorthand for top, right, bottom, left */
    background-image: url('jis-logo.PNG');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    mix-blend-mode: multiply; /* Makes the white background of the logo transparent */
    opacity: 0.15; /* Slightly increased for better visibility with blend mode */
    z-index: -1;
}


.container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    width: 100%;
    padding: 2rem;
    text-align: center;
    position: relative; /* Required for z-index */
    z-index: 11; /* Place above all diamonds */
}

.content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 650px;
    margin: 0 auto;
    animation: fadeIn 1.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tagline {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-top: 2rem; /* Add space at the top */
    text-shadow: 1px 1px 0 #FFF; /* Added white bottom-right border */
}

.cookie-consent-text {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-color);
    max-width: 550px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.5;
    text-shadow: 1px 1px 0 #FFF; /* Added white bottom-right border */
}

.cta-button {
    display: inline-block;
    font-weight: 400;
    font-size: 1rem;
    text-decoration: none;
    color: var(--button-text-color);
    background-color: var(--button-bg-color);
    padding: 12px 35px;
    border: 2px solid var(--button-bg-color);
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 13.4rem; /* Moved button down by ~400% of its height */
    text-shadow: 1px 1px 0 #606060; /* Added subtle dark bottom-right border for effect */
}

.cta-button:hover,
.cta-button:focus {
    background-color: #606060; /* Darker gray on hover */
    border-color: #606060;
    transform: translateY(-2px);
}

.page-footer {
    width: 100%;
    padding: 1rem 0;
}

.legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legal-links a {
    color: var(--footer-text-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 300;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

/* Diamond animation styles */
#diamond-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1; /* Behind text, but in front of logo */
}

.diamond-faller {
    position: absolute;
    top: -15%;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

.diamond-tumble-container {
    width: 100%;
    height: 100%;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
    transform-style: preserve-3d;
}

.diamond-tumble-container svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- Styles for the Brilliant Diamond (CSS Animation Version) --- */
.brilliant-facet {
    fill: #ffffff; /* White facets */
}

.center-facet-gloss {
    opacity: 0; /* Hidden by default, shown by animation */
    will-change: opacity;
}

.brilliant-lines-group {
    fill: none;
    stroke: #000000; /* Black lines for edges */
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(-1px -1px 0 white);
}

/* Assign animations via these classes from JS */
.flash-outer-1, .flash-outer-2 {
    animation-name: flash-outer;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: fill;
}
.flash-outer-1 { animation-duration: 0.5s; }
.flash-outer-2 { animation-duration: 0.75s; }

.flash-center {
    animation: flash-center 0.625s linear infinite;
}

/* --- Animation Keyframes --- */

@keyframes fall {
    to {
        transform: translateY(115vh);
    }
}

/* Tumble animations with tilt limited to ~20 degrees */
@keyframes tumble-1 {
    from { transform: rotate3d(0.2, 0.3, 1, 0deg); }
    to { transform: rotate3d(0.2, 0.3, 1, 360deg); }
}

@keyframes tumble-2 {
    from { transform: rotate3d(-0.3, 0.1, 1, 0deg); }
    to { transform: rotate3d(-0.3, 0.1, 1, -360deg); }
}

@keyframes tumble-3 {
    from { transform: rotate3d(0.1, -0.2, 1, 0deg); }
    to { transform: rotate3d(0.1, -0.2, 1, 360deg); }
}

/* New CSS-based flashing animations */
@keyframes flash-outer {
    0%, 49.9% { fill: #ffffff; }
    50%, 100% { fill: #000000; }
}

@keyframes flash-center {
    0%, 49.9% { opacity: 0; }
    50%, 100% { opacity: 1; }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    .tagline {
        font-size: 1.1rem;
        padding-top: 1rem;
    }
    .cookie-consent-text {
        font-size: 0.85rem;
        margin-bottom: 2rem;
    }
    .legal-links {
        gap: 1rem;
        flex-direction: column;
    }
}

/* --- Admin Page Styles --- */
.admin-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #f4f4f4;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-container h1 {
    font-size: 1.8rem;
    font-weight: 700;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.admin-container p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.admin-container .admin-actions {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
}

.admin-container button,
.admin-container .admin-button {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--button-text-color);
    background-color: var(--button-bg-color);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.admin-container button:hover,
.admin-container .admin-button:hover {
    background-color: #606060;
}

#visit-list {
    list-style: none;
    padding: 0;
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#visit-list li {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

#visit-list li:nth-child(even) {
    background-color: #ffffff;
}

#visit-list li:last-child {
    border-bottom: none;
}

/* --- Password Prompt Styles --- */
.hidden {
    display: none !important;
}

#password-prompt-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.password-box {
    background-color: #f4f4f4;
    color: var(--text-color);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.password-box h1 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.password-box p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

#password-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
}

#password-form button {
    width: 100%;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    color: var(--button-text-color);
    background-color: var(--button-bg-color);
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#password-form button:hover {
    background-color: #606060;
}

.error-message {
    color: #d93025;
    margin-top: 1rem;
    font-weight: 700;
}
