/* Global Theme Variables */
:root {
  /* Colors */
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --header-bg: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-primary: #3b82f6; /* Blue */
  --accent-secondary: #0ea5e9; /* Sky */
  --accent-male: #4ade80;   /* Green */
  --accent-female: #f472b6; /* Pink */
  --border-color: #334155;
  --danger-color: #ef4444;
  --success-color: #22c55e;
  --warning-color: #eab308;

  /* Typography */
  --font-main: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  
  /* Spacing */
  --container-width: 1200px;
  --header-height: 70px;
}

/* Light Theme Overrides */
/* Light Theme Overrides */
body.theme-light {
  --bg-color: #f8fafc !important;
  --card-bg: #ffffff !important;
  --header-bg: #ffffff !important;
  --text-main: #0f172a !important;
  --text-muted: #64748b !important;
  --border-color: #cbd5e1 !important;
  --accent-primary: #2563eb !important;
  --accent-secondary: #0284c7 !important;
}

/* Base Resets & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  text-decoration: none;
  color: var(--accent-secondary);
}

img {
  max-width: 100%;
  display: block;
}

/* Layout Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.grid {
  display: grid;
  gap: 20px;
}

.flex {
  display: flex;
  gap: 20px;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.25rem; }
.font-bold { font-weight: 700; }

/* Buttons & Inputs */
input, select, textarea, button {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

button, input[type="submit"], input[type="button"] {
  background-color: var(--accent-primary);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s;
}

button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  background-color: var(--accent-secondary);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: modalSlideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-main);
}

@keyframes modalSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
    height: 100%; /* Ensure full height for easier hovering */
    display: flex;
    align-items: center;
}
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--card-bg) !important;
    min-width: 220px;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.5);
    z-index: 100;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0; 
}
.dropdown-content a {
    color: var(--text-main) !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background 0.1s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background-color: var(--card-bg); 
}
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover {
    background-color: var(--accent-primary) !important;
    color: white !important;
}
.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Global Event Icon Colors (Moved from Events) --- */
.evt-dob .evt-icon { color: #10b981 !important; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); }
.evt-dom .evt-icon { color: #3b82f6 !important; background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); }
.evt-dod .evt-icon { color: #f59e0b !important; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2); }
