/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Custom Properties */
:root {
    --primary-color: #121213;
    --secondary-color: #787c7e;
    --accent-color: #538d4e;
    --error-color: #c9424a;
    --warning-color: #c9b458;
    --replacement-color: #ff8c00;
    --bg-color: #ffffff;
    --surface-color: #f7f7f7;
    --border-color: #d3d6da;
    --text-color: #121213;
    --text-secondary: #787c7e;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Base Typography and Layout */
body {
    font-family: 'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    margin: 0 auto;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-color), #6BB6FF, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease;
}

h1:hover {
    transform: scale(1.03);
}

.header-buttons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: var(--surface-color);
}

.icon-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Dark Mode */
body.dark-mode {
    --bg-color: #121213;
    --surface-color: #1e1e1f;
    --border-color: #3a3a3c;
    --text-color: #ffffff;
    --text-secondary: #818384;
    --replacement-color: #ffa500;
}

/* Fix for header icons in dark mode */
body.dark-mode .icon-btn {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

body.dark-mode .icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Checkbox Styling */
input[type="checkbox"] {
    width: 40px;
    height: 20px;
    appearance: none;
    background-color: var(--border-color);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

input[type="checkbox"]:checked {
    background-color: var(--accent-color);
}

input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

input[type="checkbox"]:checked::before {
    left: 22px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    background-color: var(--error-color);
}

.toast.success {
    background-color: var(--accent-color);
}
