/* ===================================
   THATSMYCHEESE - GLOBAL STYLES
   =================================== */

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

/* Lock viewport to prevent scrolling beyond background */
html {
    height: 100%;
    overflow: hidden;
}

/* Base Body Styles */
body {
    font-family: Arial, sans-serif;
    height: 100%;
    overflow: hidden;
    padding: 20px;
    position: relative;
    z-index: 0;
}

/* Fixed Background via pseudo-element (iOS Safari compatible).
   background-attachment:fixed is broken on iOS Safari, so we use
   a position:fixed pseudo-element instead. */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url('../images/background-mobile.webp');
}

/* Tablet devices (medium screens 900px - 1399px) */
@media (min-width: 900px) {
    body::before {
        background-image: url('../images/background-tablet.webp');
    }
}

/* Desktop devices (large screens 1400px and up) */
@media (min-width: 1400px) {
    body::before {
        background-image: url('../images/background-desktop.webp');
    }
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Site Header (appears on all pages except login) */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 998;
    padding: 15px 20px;
    text-align: center;
}

.site-header a {
    color: #333;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    transition: color 0.3s;
}

.site-header a:hover {
    color: #4CAF50;
}

/* Hamburger Menu Button */
.hamburger {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 52px;
    height: 42px;
    background-color: rgba(151, 120, 135, 0.85);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px 11px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #1C1323;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -5px);
}

/* Navigation Menu */
.nav-menu {
    position: fixed;
    top: 62px;
    left: 15px;
    width: 280px;
    background-color: rgba(108, 103, 146, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
    transform: scaleY(0);
    transform-origin: top left;
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
}

.nav-menu.active {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-menu a {
    display: block;
    padding: 15px 30px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.nav-menu .submenu {
    background-color: rgba(0, 0, 0, 0.1);
}

.nav-menu .submenu a {
    padding-left: 50px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Overlay (invisible click-to-close area) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: none;
    z-index: 999;
}

.overlay.active {
    display: block;
}

/* Common Typography */
h1 {
    color: #333;
    margin-bottom: 20px;
}

h2 {
    color: #4CAF50;
    font-size: 20px;
    margin-bottom: 10px;
}

p {
    color: #666;
    line-height: 1.6;
}

/* Section Links (used on jam.html) */
.section-links {
    margin-top: 30px;
}

.section-links a {
    display: block;
    padding: 15px 20px;
    margin-bottom: 10px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.section-links a:hover {
    background-color: #e0e0e0;
}

/* Authentication Page Specific Styles */
.auth-container {
    max-width: 400px;
    margin: 100px auto;
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.input-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 35px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: #666;
}

button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: #45a049;
}

.message {
    padding: 10px;
    margin-top: 15px;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-30 {
    margin-top: 30px;
}
