
/* Base styles and variables */
:root {
    --color-primary: #3498db; /* Vibrant Blue */
    --color-secondary: #e74c3c; /* Playful Red */
    --color-accent-1: #2ecc71; /* Lively Green */
    --color-accent-2: #f1c40f; /* Bright Yellow */
    --color-background: #ecf0f1; /* Soft Grey */
    --color-text-dark: #2c3e50; /* Dark Grey */
    --color-text-light: #ffffff; /* White */
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 6px 10px rgba(0, 0, 0, 0.15);
    --border-radius-soft: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-align: center;
}

/* Header Styling */
.header {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: 2rem 1rem;
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content Grid for Icons */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Mobile-first: adjust columns */
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto 2rem auto; /* Center and add bottom margin */
    flex-grow: 1; /* Allow grid to grow and push footer down */
}

/* Individual Icon Link Styling */
.icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-text-light);
    border-radius: var(--border-radius-soft);
    padding: 1rem;
    text-decoration: none;
    color: var(--color-text-dark);
    box-shadow: var(--shadow-light);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.2s ease-out;
}

.icon-link:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: var(--shadow-medium);
    background-color: lighten(var(--color-background), 5%); /* Slightly lighter on hover */
}

.icon-link:active {
    transform: translateY(0px) scale(0.98); /* "Pressed" effect */
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.icon-img {
    width: 100px; /* Adjust size of generated images */
    height: 100px;
    object-fit: contain; /* Ensure image fits without cropping */
    margin-bottom: 0.75rem;
    border-radius: 8px; /* Soften image corners */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); /* Subtle shadow for depth */
}

.icon-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

/* Main Content Grid for Icons */
#mainContent {
    display: none; /* Hidden by default until disclaimer is accepted by JS */
}

/* Footer Styling */
.footer {
    padding: 1.5rem 1rem;
    background-color: var(--color-text-dark);
    color: var(--color-background);
    font-size: 0.9rem;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

/* Disclaimer Overlay Styling */
.disclaimer-overlay {
    display: flex; /* Shown by default, JS will hide if agreed */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Darker background */
    z-index: 2000; /* Higher than iframe overlay */
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
    text-align: center;
}

.disclaimer-container {
    background-color: var(--color-text-light);
    border-radius: var(--border-radius-soft);
    padding: 2rem;
    margin: 1rem;
    max-width: 500px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.disclaimer-container h2 {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.disclaimer-container p {
    font-size: 1.1rem;
    color: var(--color-text-dark);
}

.agree-button {
    background-color: var(--color-accent-1); /* Lively Green */
    color: var(--color-text-light);
    border: none;
    border-radius: var(--border-radius-soft);
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow-light);
    transition: background-color 0.2s ease-out, transform 0.2s ease-out;
    margin-top: 1rem;
}

.agree-button:hover {
    background-color: #27ae60; /* Darker green on hover */
    transform: translateY(-2px);
}

.agree-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}


/* Iframe Overlay Styling */
.iframe-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark semi-transparent background */
    z-index: 1000; /* Ensure it's above everything else */
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.iframe-container {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    max-height: 800px;
    background-color: var(--color-text-light);
    border-radius: var(--border-radius-soft);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    display: flex; /* Use flex to make iframe fill container */
    flex-direction: column;
    overflow: hidden; /* Hide any overflow from iframe or button */
}

.iframe-container iframe {
    flex-grow: 1; /* Allow iframe to take up all available space */
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--border-radius-soft);
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--color-secondary); /* Red button */
    color: var(--color-text-light);
    border: none;
    border-radius: 50%; /* Circular button */
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Above the iframe */
    box-shadow: var(--shadow-light);
    transition: background-color 0.2s ease-out, transform 0.2s ease-out;
}

.close-button:hover {
    background-color: #c0392b; /* Darker red on hover */
    transform: scale(1.05);
}

.close-button:active {
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Keyframe for fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive adjustments */
@media (min-width: 600px) {
    .icon-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 2rem;
    }

    .header h1 {
        font-size: 3rem;
    }

    .header p {
        font-size: 1.2rem;
    }
}

@media (min-width: 900px) {
    .icon-grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 3rem;
    }
}
    