/* --- User Provided Fonts --- */
@font-face {
  font-family: 'Noto Serif SC';
  src: url('https://static.tian14.com/fonts/NotoSerifSC-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif SC';
  src: url('https://static.tian14.com/fonts/NotoSerifSC-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif SC';
  src: url('https://static.tian14.com/fonts/NotoSerifSC-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* --- "Modern Dark" Theme (Default) --- */
:root {
    --color-bg: #121212; /* Standard Dark Grey */
    --color-bg-transparent: rgba(18, 18, 18, 0.8);
    --color-bg-input: #2d2d2d;
    --color-bg-input-focus: #3d3d3d;
    --color-footer-bg: #181818;
    --color-text: #e0e0e0; /* Soft White */
    --color-text-muted: #a0a0a0;
    --color-placeholder: #666666;
    --color-card-bg: #1e1e1e; /* Slightly lighter grey for cards */
    --color-border: #333333;
    --color-border-strong: #444444;
    --color-primary: #3cc2f5; /* Keep Icy Blue for accent */
    --color-primary-dark: #2aabd9;
    --color-accent-pink: #ff6b81;
    --color-accent-pink-dark: #ff4757;
    --color-accent-pink-glow: rgba(255, 107, 129, 0.5);
    --color-error: #ff7675;
    --color-success: #55efc4;
    --glow-color-default: #3cc2f5;

    /* Tooltip Variables (Dark Theme Default -> White Tooltip) */
    --color-tooltip-bg: #ffffff;
    --color-tooltip-text: #121212;
    
    /* Deprecated login variables, kept for reference but mapped to new theme */
    --color-login-overlay: rgba(0, 0, 0, 0.6);
    --color-login-box: #1e1e1e;
    --color-border-login: #333333;

    /* Button Variables (Dark Theme) */
    --btn-bg: #101010;
    --btn-text: #ffffff;
    --btn-text-dim: rgba(255, 255, 255, 0.35);
    --btn-border: rgba(255, 255, 255, 0.15);
    --btn-icon-fill: #e8e8e8;
    --btn-shadow-inset-1: rgba(255, 255, 255, 0.2);
    --btn-shadow-inset-2: rgba(255, 255, 255, 0.05);
    --btn-shadow-drop: rgba(0, 0, 0, 0.05);
    --btn-pseudo-bg: rgba(0,0,0,0.2); /* For the ::before element */
    --featured-card-highlight: var(--color-primary); /* Default to primary for dark theme */
}

html, body, a, button, input, select, textarea {
    /* cursor: none; Removed to restore default cursor */
}

/* --- "Arctic Ice" Light Theme --- */
html[data-theme="light"] {
    --color-bg: #f0f8ff; /* Alice Blue */
    --color-bg-transparent: rgba(255, 255, 255, 0.7);
    --color-bg-input: rgba(0, 0, 0, 0.05);
    --color-bg-input-focus: rgba(0, 0, 0, 0.08);
    --color-footer-bg: #e3f2fd;
    --color-text: #0b132b; /* Dark Blue */
    --color-text-muted: #3a506b;
    --color-placeholder: #6a7c95;
    --color-card-bg: #ffffff;
    --color-border: rgba(0, 0, 0, 0.1);
    --color-border-strong: rgba(0, 0, 0, 0.2);
    --color-primary: #0077b6; /* Saturated Blue */
    --color-primary-dark: #005f9e;
    --color-accent-pink: #ff8fa3;
    --color-accent-pink-dark: #ff6b81;
    --color-accent-pink-glow: rgba(255, 143, 163, 0.5);

    /* Tooltip Variables (Light Theme -> Dark Tooltip) */
    --color-tooltip-bg: #2c3e50;
    --color-tooltip-text: #ffffff;

    /* Login/Modal Variables for Light Theme */
    --color-login-box: #ffffff;
    --color-border-login: rgba(0, 0, 0, 0.1);
    --color-login-overlay: rgba(240, 248, 255, 0.6);

    /* Button Variables (Light Theme) */
    --btn-bg: #ffffff;
    --btn-text: #0b132b;
    --btn-text-dim: rgba(11, 19, 43, 0.4);
    --btn-border: rgba(0, 0, 0, 0.1);
    --btn-icon-fill: #0b132b;
    --btn-shadow-inset-1: rgba(0, 0, 0, 0.05); /* Subtle dark inset for light mode */
    --btn-shadow-inset-2: rgba(0, 0, 0, 0.02);
    --btn-shadow-drop: rgba(0, 0, 0, 0.1);
    --btn-pseudo-bg: rgba(0,0,0,0.05);
    --featured-card-highlight: #FFA500; /* Orange for light theme */
}

html { 
    scroll-behavior: smooth; 
    background-color: var(--color-bg);
}

body {
    /* Updated Font */
    font-family: 'Noto Serif SC', serif;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    /* Removed padding: 20px 0; to allow flexbox to control the full height */
    color: var(--color-text);
    min-height: 100vh;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Ensure form elements inherit the global font */
button, input, select, textarea {
    font-family: inherit;
}

#password-overlay,
header, 
main, 
footer, 
#scroll-to-top-btn, 
.logout-btn,
.login-btn, /* Added login-btn */
.theme-btn, 
#search-input,
.tool-list a,
.control-btn,
.category-title,
.login-container,
.back-to-home,
#side-dock {
    pointer-events: auto;
}