:root {
    --primary-color: #C41E3A; /* Cardinal Red */
    --primary-dark: #8a1529;
    --secondary-color: #165B33; /* Christmas Green */
    --accent-color: #D4AF37; /* Metallic Gold */
    --accent-hover: #b5952f;
    --text-color: #ffffff;
    --text-muted: #e0e0e0;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-heading: 'Mountains of Christmas', cursive;
    --font-body: 'Poppins', sans-serif;
}

/* General Body Styles */
body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #1a0b0e 0%, #4a0e16 50%, #0f2e1b 100%);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    position: relative;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.main-content-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

/* Snow Effect */
.snow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    color: #fff;
    z-index: 1;
    animation: fall linear infinite;
    pointer-events: none;
    user-select: none;
}

@keyframes fall {
    0% { transform: translateY(-10vh); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* Glassmorphism Containers */
.login-container, .home-container, .popup-content {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 40px;
    text-align: center;
    z-index: 2;
    max-width: 600px;
    width: 90%;
    margin-top: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.login-container:hover, .home-container:hover {
    transform: translateY(-5px);
}

/* Typography */
h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    font-weight: 700;
}

h2 { font-size: 3em; }
h3 { font-size: 2.2em; }
h4 { font-size: 1.5em; }

p {
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-muted);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--accent-color);
}

/* Forms & Inputs */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.input-group input[type="text"],
.input-group input[type="password"],
.input-group input[type="email"],
.input-group input[type="number"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1em;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.input-group input:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* Buttons */
button, .tab-button {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0f2e1b 100%);
    color: #fff;
    padding: 12px 25px;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:hover, .tab-button:hover {
    background: linear-gradient(135deg, #1e7e45 0%, #165B33 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.delete-button {
    background: linear-gradient(135deg, #DC143C 0%, #8B0000 100%);
    padding: 8px 15px;
    font-size: 0.85em;
    border-radius: 8px;
}

.delete-button:hover {
    background: linear-gradient(135deg, #ff4d4d 0%, #DC143C 100%);
}

.update-button {
    background: linear-gradient(135deg, var(--accent-color) 0%, #b5952f 100%);
    color: #000;
}

.update-button:hover {
    background: linear-gradient(135deg, #ffd700 0%, #D4AF37 100%);
}

/* Inner Sections (Preferences, Info) */
.secret-santa-info-container,
.preference-form,
.meal-preferences-section,
.gift-ideas-form,
.admin-tabs {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
    border: 1px solid var(--glass-border);
    text-align: left;
}

.secret-santa-info-container h3,
.preference-form h3,
.meal-preferences-section h3,
.gift-ideas-form h3 {
    text-align: center;
    margin-top: 0;
    color: var(--accent-color);
}

/* Lists */
ul {
    list-style: none;
    padding: 0;
}

li.gift-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

li.gift-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Admin Tabs */
.tab-buttons {
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px 15px 0 0;
    padding: 10px;
    gap: 10px;
}

.tab-button {
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--text-muted);
    border-radius: 10px;
}

.tab-button.active {
    background: var(--accent-color);
    color: #000;
    font-weight: 700;
}

.tab-content {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.5s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-color);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.2em;
    letter-spacing: 1px;
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Messages */
.error-message, .success-message {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.error-message {
    background: rgba(220, 20, 60, 0.2);
    border: 1px solid #DC143C;
    color: #ff9999;
}

.success-message {
    background: rgba(50, 205, 50, 0.2);
    border: 1px solid #32CD32;
    color: #99ff99;
}

/* Popup */
.popup {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.close-button {
    color: var(--accent-color);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2em;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-button:hover {
    transform: rotate(90deg);
    color: #fff;
}

/* Checkboxes */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--secondary-color);
    cursor: pointer;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
    h2 { font-size: 2.5em; }
    .login-container, .home-container { padding: 25px; }
    .tab-buttons { flex-direction: column; }
    .meal-preferences-content { flex-direction: column; }
}
