html, body, textarea, input, a, p, pre, div, span, h5, h4, h3, h2, h1{
    /*font-family: 'NotoSans Regular','Malgun Gothic','맑은 고딕', "SF Pro KR","SF Pro Text","SF Pro Icons","Apple Gothic","HY Gulim","MalgunGothic","HY Dotum","Lexi Gulim","Helvetica Neue","Helvetica","Arial",sans-serif;*/
    font-family: 'Pretendard', 'Apple SD Gothic Neo', '맑은 고딕', '맑은고딕', 'Malgun Gothic', sans-serif;
}

/* Common CSS Custom Properties */
:root {
    --bs-topbar-height: 75px;
    --bs-topbar-bg: #f9fbfd;
    --bs-topbar-b-border-color: #e3ebf6;
    --bs-topbar-nav-icon-bg: #fff;
    --bs-topbar-nav-icon-color: #424d65;
    --bs-startbar-width: 270px;
    --bs-startbar-collapsed-width: 70px;
    --bs-startbar-bg: #fff;
    --bs-startbar-e-border-color: #e3ebf6;
    --bs-menu-icon-color: #96a0b5;
    --bs-menu-link-color: #061237;
    --bs-menu-link-active-bg-color: #f9fbfd;
    --bs-nav-link-disc-color: #8997bd;
    --bs-menu-label-color: #a0a5b3;
    --bs-label-color: #656d9a;
    --bs-text-muted: var(--bs-secondary-color);
    --bs-box-shadow-sm: 0 2px 2px rgba(61, 71, 81, 0.05);
    --bs-card-bg: var(--bs-secondary-bg);
    --bs-theme-white-color: #ffffff;
    --bs-border-secondary: #95a0c5;
    --bs-table-head-bg: #f4f6f9;
    --primary-color: #00c9ff;
    --primary-dark: #0099cc;
    --primary-light: #33d4ff;
}

html[data-bs-theme=dark] {
    --bs-light: #303231;
    --bs-light-rgb: 48, 50, 49;
    --bs-dark: #f4f6f9;
    --bs-dark-rgb: 244, 246, 249;
    --bs-label-color: #9797a5;
    --bs-theme-white-color: #2e2e31;
    --bs-body-color: #d9e1ec;
    --bs-text-muted: #aab0b9;
    --bs-box-shadow-sm: 0 2px 2px rgba(61, 71, 81, 0.05);
    --bs-card-bg: #151821;
    --bs-topbar-bg: #141824;
    --bs-topbar-b-border-color: #333547;
    --bs-topbar-nav-icon-bg: #222735;
    --bs-topbar-nav-icon-color: #a1a8bd;
    --bs-secondary: #c3c3c3;
    --bs-secondary-rgb: 195, 195, 195;
    --bs-border-secondary: #333645;
    --bs-table-head-bg: #222735;
    --bs-startbar-bg: #141824;
    --bs-startbar-e-border-color: #333547;
    --bs-menu-icon-color: #5e748b;
    --bs-menu-link-color: #a1a8bd;
    --bs-menu-link-active-bg-color: rgba(249, 251, 253, 0.04);
    --bs-menu-link-hover-color: #ffffff;
    --bs-nav-link-disc-color: #8997bd;
    --bs-menu-label-color: #a0a5b3;
}

html[data-startbar=dark] {
    --bs-startbar-bg: #141824;
    --bs-startbar-e-border-color: #333547;
    --bs-menu-icon-color: #5e748b;
    --bs-menu-link-color: #a1a8bd;
    --bs-menu-link-active-bg-color: rgba(249, 251, 253, 0.04);
    --bs-menu-link-hover-color: #ffffff;
    --bs-nav-link-disc-color: #8997bd;
    --bs-menu-label-color: #a0a5b3;
    --bs-dark: #f4f6f9;
    --bs-box-shadow-sm: 0 2px 2px rgba(61, 71, 81, 0.05);
}

:root {
    --primary-color: #00d4ff;
    --primary-dark: #00a3cc;
    --primary-light: #33d9ff;
    --custom-bg: #0f172a;
    --custom-surface: #1e293b;
    --custom-border: #334155;
    --custom-text: #f1f5f9;
    --custom-text-muted: #94a3b8;
    --custom-shadow: rgba(0, 0, 0, 0.3);
    --custom-hover: #334155;
}

/* 라이트 모드 변수 */
[data-bs-theme="light"] {
    --custom-bg: #f8fafc;
    --custom-surface: #ffffff;
    --custom-border: #e2e8f0;
    --custom-text: #1a202c;
    --custom-text-muted: #64748b;
    --custom-shadow: rgba(0,0,0,0.1);
    --custom-hover: #f1f5f9;
}

/* 다크 모드 변수 */
[data-bs-theme="dark"] {
    --custom-bg: #0f172a;
    --custom-surface: #1e293b;
    --custom-border: #334155;
    --custom-text: #f1f5f9;
    --custom-text-muted: #94a3b8;
    --custom-shadow: rgba(0,0,0,0.3);
    --custom-hover: #334155;
    --primary-color: #00d4ff;
    --primary-dark: #00a3cc;
    --primary-light: #33d9ff;
}

/* User Profile and Language Dropdown Button */
.user-profile-btn {
    background: var(--custom-surface);
    border: 1px solid var(--custom-border);
    border-radius: 20px;
    padding: 6px 12px;
    color: var(--custom-text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.user-profile-btn:hover {
    background: var(--custom-hover);
}

.user-profile-btn-text {
    font-weight: 500;
}

.language-toggle-dropdown,
.user-profile-dropdown {
    position: relative;
}

.language-dropdown-menu,
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: var(--custom-surface);
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--custom-shadow);
    min-width: 150px;
    z-index: 1000;
    display: none;
}

.language-dropdown-menu.show,
.user-dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease-in;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--custom-text);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--custom-hover);
    color: var(--custom-text);
}

.dropdown-item.active {
    background-color: var(--primary-color);
    color: white;
}

.dropdown-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.dropdown-item:first-child:hover,
.dropdown-item:first-child.active {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.dropdown-item:last-child:hover,
.dropdown-item:last-child.active {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Login page specific positioning */
.language-toggle-dropdown.login-left-top-right {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

/* 모바일에서도 login-left 우측상단에 위치 */
@media (max-width: 991.98px) {
    .language-toggle-dropdown.login-left-top-right {
        top: 15px;
        right: 15px;
    }
}

.flag-icon {
    font-size: 1.2em;
    width: 20px;
    text-align: center;
}

/* Mobile responsive - hide text and chevron in dropdowns */
@media (max-width: 768px) {
    .user-profile-btn-text,
    .user-profile-btn .bi-chevron-down {
        display: none !important;
    }
}

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

.btn.disabled,
.btn:disabled{
    background: var(--bs-primary-bg-subtle);
}

/* Toast Container for stacking */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* React-Toastify Style Toast Notification */
.toast-notification {
    position: relative;
    background: var(--custom-surface);
    border: 1px solid var(--custom-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--custom-shadow);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    max-width: 320px;
    min-width: 280px;
    overflow: hidden;
    pointer-events: auto;
}

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

.toast-notification-content {
    display: flex;
    align-items: center;
    padding: 16px;
    position: relative;
}

.toast-notification-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}

.toast-notification-message {
    flex: 1;
    color: var(--custom-text);
    line-height: 1.4;
}

.toast-notification-close {
    width: 20px;
    height: 20px;
    margin-left: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--custom-text-muted);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.toast-notification-close:hover {
    background-color: var(--custom-hover);
}

.toast-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    transform-origin: left;
    animation: toast-progress 3s linear forwards;
}

/* Toast notification type styles */
.toast-notification.success .toast-notification-icon {
    background-color: #07bc0c;
    color: white;
}
.toast-notification.success .toast-notification-progress {
    background-color: #07bc0c;
}

.toast-notification.error .toast-notification-icon {
    background-color: #e74c3c;
    color: white;
}
.toast-notification.error .toast-notification-progress {
    background-color: #e74c3c;
}

.toast-notification.warning .toast-notification-icon {
    background-color: #f39c12;
    color: white;
}
.toast-notification.warning .toast-notification-progress {
    background-color: #f39c12;
}

.toast-notification.info .toast-notification-icon {
    background-color: #3498db;
    color: white;
}
.toast-notification.info .toast-notification-progress {
    background-color: #3498db;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Responsive adjustments for mobile toast notifications */
@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
    }

    .toast-notification {
        max-width: none;
        min-width: auto;
    }
}


/* form check */
.cookie-category .form-check.form-switch .form-check-input:focus{
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.25%29'/%3e%3c/svg%3e")
}

.cookie-category .form-check.form-switch .form-check-input:focus:checked{
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
}

/* Alert Modal Styles */
.alert-modal .alert-icon {
    font-size: 3rem !important;
    color: var(--primary-color) !important;
}

.alert-modal .alert-message {
    font-size: 1.4rem;
    color: var(--custom-text);
    line-height: 1.5;
    text-align: center;
}

.alert-modal .modal-content {
    border: 1px solid var(--custom-border);
    background: var(--custom-surface);
}

.alert-modal .btn.brand-bg {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.alert-modal .btn.brand-bg:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

