/* Theme CSS Variables for Dark/Light Mode */

:root {
    /* Light Mode Colors (default) */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f9f9f9;
    --bg-gradient-start: #1e3c72;
    --bg-gradient-end: #2a5298;

    --text-primary: #333;
    --text-secondary: #666;
    --text-tertiary: #999;
    --text-on-gradient: #ffffff;

    --border-color: #ddd;
    --border-light: #f0f0f0;
    --border-focus: #2a5298;

    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

    --primary-color: #2a5298;
    --primary-hover: #1e3c72;
    --primary-light: rgba(42, 82, 152, 0.1);

    --error-bg: #fee;
    --error-text: #c00;
    --error-border: #c00;

    --success-bg: #d4edda;
    --success-text: #155724;
    --success-border: #28a745;

    --warning-bg: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
    --warning-badge: #ff9800;

    --danger-bg: #dc3545;
    --danger-hover: #c82333;

    --input-bg: #ffffff;
    --input-border: #ddd;
    --input-focus-shadow: rgba(42, 82, 152, 0.1);

    --card-bg: #ffffff;
    --card-hover-bg: #f9f9f9;

    --photo-placeholder-bg: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    --photo-placeholder-text: #999;

    --modal-overlay: rgba(0, 0, 0, 0.95);
    --modal-close-bg: rgba(0, 0, 0, 0.5);
    --modal-close-hover: rgba(0, 0, 0, 0.8);

    --navbar-btn-bg: rgba(255, 255, 255, 0.2);
    --navbar-btn-hover: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #181818;
    --bg-gradient-start: #0f1f3d;
    --bg-gradient-end: #162d52;

    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-tertiary: #808080;
    --text-on-gradient: #ffffff;

    --border-color: #404040;
    --border-light: #353535;
    --border-focus: #4a7ac9;

    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.7);

    --primary-color: #4a7ac9;
    --primary-hover: #3d6ab8;
    --primary-light: rgba(74, 122, 201, 0.2);

    --error-bg: #3a1a1a;
    --error-text: #ff6b6b;
    --error-border: #cc0000;

    --success-bg: #1a3a1a;
    --success-text: #6fdc6f;
    --success-border: #28a745;

    --warning-bg: linear-gradient(135deg, #cc7a00 0%, #cc451a 100%);
    --warning-badge: #ff9800;

    --danger-bg: #dc3545;
    --danger-hover: #c82333;

    --input-bg: #2d2d2d;
    --input-border: #404040;
    --input-focus-shadow: rgba(74, 122, 201, 0.3);

    --card-bg: #1e1e1e;
    --card-hover-bg: #252525;

    --photo-placeholder-bg: linear-gradient(135deg, #3a3a3a, #2d2d2d);
    --photo-placeholder-text: #808080;

    --modal-overlay: rgba(0, 0, 0, 0.95);
    --modal-close-bg: rgba(0, 0, 0, 0.7);
    --modal-close-hover: rgba(0, 0, 0, 0.9);

    --navbar-btn-bg: rgba(255, 255, 255, 0.15);
    --navbar-btn-hover: rgba(255, 255, 255, 0.25);
}

/* Floating Theme Toggle Button */
.theme-toggle-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

.theme-toggle-floating:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.theme-toggle-floating .dismiss-btn {
    margin-left: 0.5rem;
    padding: 0.2rem 0.4rem;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    border-radius: 3px;
    transition: all 0.2s;
}

.theme-toggle-floating .dismiss-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.theme-toggle-floating.hidden {
    display: none;
}

/* Disable transitions on initial page load */
.no-transitions,
.no-transitions * {
    transition: none !important;
}

/* Smooth transition for theme changes */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ========================
   Unidentified Player Styles
   ======================== */

/* Badge for unidentified players */
.unidentified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--warning-badge);
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: bold;
    margin-left: 0.5rem;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Badge on gallery/dashboard cards */
.unidentified-badge-card {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--warning-badge);
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Physical descriptors section styling */
.descriptors-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.descriptor-section {
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background: var(--bg-tertiary);
}

/* Descriptor tags */
.descriptor-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Status filter links */
.status-filter a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 0.85rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.status-filter a:hover {
    background: var(--bg-tertiary);
}
