/* * 01_global.css 
 * Contains: Root variables, body, global helpers, toast, animations
 */

/* ---------------------------------- */
/* 1. Root & Global Styles         */
/* ---------------------------------- */
:root {
    --primary-color: #3fa9f5;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --text-color-secondary: #aaaaaa;
    --border-color: #333333;
    --danger-color: #e53935;
    --success-color: #4CAF50;
}

body::before {
    content: '';
    position: fixed; /* Stays in place when scrolling */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Sits BEHIND your page content */
    
    /* Assumes 'bg.webp' is in an 'img' folder, adjust if needed */
    background-image: url('../img/bg.webp'); 
    
    background-repeat: repeat; /* This makes it seamless */
    
    /* This is where you make it "very subtle" */
    opacity: 0.05; 
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    position: relative; 
    overflow-x: hidden; 
	animation: fadeIn 0.3s ease-in;
}

/* Stops background scrolling when a modal is open */
body.modal-open {
    overflow: hidden;
}

/* General container for padded content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Global helper class to hide elements */
.hidden {
    display: none !important;
}

/* ---------------------------------- */
/* 2. Typography (From original file) */
/* ---------------------------------- */
header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-weight: 700;
    margin-bottom: 5px;
}

header p {
    color: var(--text-color-secondary);
    font-weight: 300;
}

/* ---------------------------------- */
/* 3. Toast Notifications           */
/* ---------------------------------- */
.toast {
    visibility: hidden; /* Start hidden */
    min-width: 350px;
    max-width: 85%;
    background-color: red; /* Use a more noticeable color */
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 20px;
    font-weight: bold;
    position: fixed; /* Fixed position relative to viewport */
    z-index: 2000;   /* Above everything */
    
    /* --- This is the new positioning --- */
    bottom: 50px; /* Start position (just below buttons) */
    left: 50%;
    transform: translate(-50%, 0); /* Center it horizontally */
    
    /* --- Transition for fade in/out --- */
    opacity: 0;
    transition: opacity 0.1s ease, top 0.1s ease, visibility 0.1s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
    visibility: visible;
    opacity: 1;
	bottom: 50px; /* End position, slightly lower */
	
}

/* ---------------------------------- */
/* 14. Animations                   */
/* ---------------------------------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; }}
@keyframes fadeOut {from { opacity: 1; } to { opacity: 0; }}
@keyframes slideIn { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@keyframes glowing-border {
    0% { border-color: var(--border-color); box-shadow: none; }
    50% { border-color: var(--primary-color); box-shadow: 0 0 10px var(--primary-color); }
    100% { border-color: var(--border-color); box-shadow: none; }
}

.body-fade-out {animation: fadeOut 0.1s ease-out forwards;}

/* ---------------------------------- */
/* 15. Footer                       */
/* ---------------------------------- */
.site-footer-credits {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.9rem;
    color: var(--text-color-secondary);
}

.site-footer-credits a {
    color: var(--text-color-secondary);
    text-decoration: none;
}

.site-footer-credits a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* New class to hide elements visually but keep them accessible */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}