:root {
    --color-bg: #f5f7fa;
    --color-surface: #ffffff;
    --color-text: #2c3e50;
    --color-text-secondary: #7f8c8d;
    --color-primary: #3498db;
    --color-primary-hover: #2980b9;
    --color-success: #2ecc71;
    --color-warning: #f39c12;
    --color-error: #e74c3c;
    --color-border: #e0e0e0;
    --color-accordion-start: #667eea;
    --color-accordion-end: #764ba2;
    --color-surface-alt: #f8f9fa;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --color-bg: #1a1a2e;
    --color-surface: #16213e;
    --color-text: #e0e0e0;
    --color-text-secondary: #a0a0b0;
    --color-primary: #4a9eff;
    --color-primary-hover: #3a8eef;
    --color-success: #4caf50;
    --color-warning: #ffb74d;
    --color-error: #ef5350;
    --color-border: #2a2a4a;
    --color-accordion-start: #4a4a8a;
    --color-accordion-end: #5a3a8a;
    --color-surface-alt: #1e2a4a;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

::selection {
    background: var(--color-primary);
    color: white;
}

#notificationContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification-toast {
    background: var(--color-surface);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 350px;
}

.notification-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-toast.success { border-left-color: var(--color-success); }
.notification-toast.warning { border-left-color: var(--color-warning); }
.notification-toast.error { border-left-color: var(--color-error); }
.notification-toast.info { border-left-color: var(--color-primary); }

.notification-icon { font-size: 1.4em; flex-shrink: 0; }
.notification-content { flex: 1; min-width: 0; }
.notification-message { color: var(--color-text); font-weight: 500; line-height: 1.4; font-size: 0.95em; }

.notification-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #95a5a6;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: var(--color-error);
    background: var(--color-surface-alt);
}

@media (max-width: 768px) {
    #notificationContainer {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    .notification-toast { max-width: none; }
}

#backToTop {
    all: unset;
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    border: none;
    outline: none;
    background-color: var(--color-primary);
    color: white;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

#backToTop.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

#backToTop:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-3px) scale(1.05);
}

#backToTop svg {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.alert-warning {
    background-color: #fff3cd;
    border-left: 5px solid #ffeeba;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
