/* Master CSS file for the website */
/* This file contains the main styles for the website */

/* In CSS, px (pixels) is an absolute unit of measurement, representing a fixed size on the screen,
while rem (root em) is a relative unit based on the root font size of the document (usually 16px).

vh (Viewport Height) represents a percentage of the viewport's height,
which is the visible area of the browser window.
1vh is equal to 1% of the viewport height.
100vh equals the full height of the browser window.

% (Percent) is a relative unit that represents a percentage of the parent element's size,
but vh is relative to the viewport size.
*/

/* --- Base Styles & Variables --- */
:root {
    --primary-bg: #141414; /* Black */
    --secondary-bg: #181818; /* Black Light */
    --lighter-bg: #333333; /* Dark Gray */
    --darker-bg: #1f1f1f; /* Darker Gray */
    --primary-accent: #e50914; /* Red */
    --secondary-accent: #bd0f18; /* Dark Red */
    --primary-text: #ffffff; /* Pure White */
    --secondary-text: #999999; /* Light Gray */
    --success-color: #28a745; /* Green */
    --error-color: #dc3545; /* Red */
    --white: #ffffff; /* Pure White */
    --black: #000000; /* Pure Black */
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

/* Universal selector to apply styles to all elements */
* {
    box-sizing: border-box; /* Ensure padding and border are included in element's total width and height */
    margin: 0;
    padding: 0;
}

/* --- Basic Body Styling --- */
body {
    background-color: var(--primary-bg);
    font-family: var(--font-primary);
    color: var(--primary-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1rem; /* Base font size */
    line-height: 1.6;
}

/* --- Global Link Styles --- */
a {
    color: var(--primary-text);
    text-decoration: none;
    transition: color 0.2s ease-in-out, text-decoration 0.2s ease-in-out;
}
a:hover {
    text-decoration: none;
}

/* --- Notification Popup --- */
/* This is the main container for the notification popup.
It's positioned fixed to stay in the top-right corner of the screen.
'z-index' is set very high to ensure it appears above all other content.
It starts hidden ('transform' and 'opacity') and will fade in with a transition.
*/
.notification-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: var(--darker-bg);
    color: var(--primary-text);
    border-radius: 8px;
    padding: 16px;
    min-width: 300px;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-left: 5px solid var(--primary-accent); /* Default border color */
    
    /* Animation properties */
    transform: translateX(120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease, visibility 0.4s ease;
}

/*
The '.show' class is added by JavaScript to make the popup visible.
It slides in from the right and fades in.
*/
.notification-popup.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* Modifier class for a SUCCESS notification */
.notification-popup.success {
    border-left-color: var(--success-color);
}

/* Modifier class for an ERROR notification */
.notification-popup.error {
    border-left-color: var(--error-color);
}

/* --- Internal Layout --- */
.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-icon i {
    display: none;
    font-size: 1.8rem;
}

/* Set icon color based on type */
.notification-popup.success .notification-icon { color: var(--success-color); }
.notification-popup.error .notification-icon { color: var(--error-color); }

.notification-message {
    flex-grow: 1; /* Allows message to take up available space */
    font-size: 0.95rem;
    line-height: 1.4;
}

/* --- Close Button --- */
.notification-close {
    background: none;
    border: none;
    color: var(--secondary-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}
.notification-close:hover {
    color: var(--primary-text);
}

/* --- Progress Bar --- */
.notification-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--lighter-bg);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* The inner bar that animates */
.notification-progress-bar div {
    height: 100%;
    background-color: var(--primary-accent); /* Default color */
    border-bottom-left-radius: 8px;
    width: 0%; /* Start at 0, animation will fill it */
}

/* Progress bar color based on type */
.notification-popup.success .notification-progress-bar div { background-color: var(--success-color); }
.notification-popup.error .notification-progress-bar div { background-color: var(--error-color); }

/* * When the 'show' class is added, we trigger the animation on the progress bar.
    * It animates the width from 100% to 0% over 6 seconds.
*/
.notification-popup.show .notification-progress-bar div {
    animation: progressBar 6s linear forwards;
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}
/* --- End of Notification Popup --- */


/* --- Responsive Design for Global Elements --- */
@media (max-width: 768px) {
}
