/* UserTable 페이지 전용 CSS 변수 - UserOutput 테마 기반 */
.user-table-page {
    /* Eye-Comfort Warm Palette (UserOutput과 동일) */
    --bg-app: #f5f5f0;
    --bg-paper: #fafaf9;
    --text-primary: #44403c;
    --text-secondary: #78716c;
    --text-tertiary: #a8a29e;

    /* Brand Colors */
    --primary-color: #578e7e;
    --primary-hover: #437063;
    --primary-light: #eef5f3;
    --primary-dark: #437063;

    /* Status */
    --success-color: #4d7c74;
    --success-bg: #f0fdf4;
    --danger-color: #be123c;
    --error-color: #be123c;
    --error-bg: #fff1f2;
    --warning-color: #d97706;

    /* UI Elements */
    --border-color: #e7e5e4;
    --focus-ring: rgba(87, 142, 126, 0.4);
    --background: #ffffff;
    --background-secondary: #fafaf9;
    --secondary-color: #f5f5f4;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(68, 64, 60, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(68, 64, 60, 0.08), 0 2px 4px -1px rgba(68, 64, 60, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(68, 64, 60, 0.08), 0 4px 6px -2px rgba(68, 64, 60, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(68, 64, 60, 0.1);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-normal: 200ms ease-out;

    /* Layout - 헤더(56px) + 토글(52px) */
    --common-header-offset: 108px;
}

/* 공통 헤더 높이만큼 본문을 안전하게 내린다 */
.user-table-page {
    padding-top: var(--common-header-offset, 108px);
}

/* 고정 토글 버튼 */
.mode-toggle-container {
    position: fixed;
    top: 56px;
    left: 280px;
    z-index: 999;
    pointer-events: none;
    transition: top 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

/* 헤더가 숨겨졌을 때 토글을 상단으로 이동 */
body.header-hidden .mode-toggle-container {
    top: 8px;
}

/* 스크롤 프로그레스 바 */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #6dd5a0);
    width: 0%;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.header-hidden .scroll-progress-bar {
    opacity: 1;
}

.mode-toggle {
    pointer-events: auto;
    position: relative;
    display: inline-flex;
    border-radius: 50px;
    padding: 4px;
}

/* 통합 모드 바 */
.unified-mode-bar {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    padding: 4px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* 수직 구분선 */
.bar-divider {
    width: 1px;
    height: 28px;
    background: var(--border-color);
    margin: 0 8px;
    flex-shrink: 0;
}

.mode-toggle-btn {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-normal);
    border-radius: 50px;
}

.mode-toggle-btn:hover:not(.active) {
    color: var(--text-primary);
}

.mode-toggle-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.mode-toggle-btn.active {
    color: white;
}

.mode-toggle-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.mode-toggle-btn:hover svg {
    transform: scale(1.1);
}

.mode-toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 4px);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 50px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(87, 142, 126, 0.4);
}

.mode-toggle-slider.solve {
    transform: translateX(100%);
}

/* 편집 모드 옵션 (통합 바 내부) */
.edit-options {
    pointer-events: auto;
    display: none;
    align-items: center;
    gap: 8px;
}

.edit-options.visible {
    display: flex;
    opacity: 1;
    transform: translateX(0);
}

.add-table-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.add-table-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.add-table-btn:active {
    transform: scale(0.98);
}

/* 테이블 드롭다운 선택기 */
.table-dropdown {
    position: relative;
}

.table-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-paper);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 100px;
    max-width: 160px;
}

.table-dropdown-trigger:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.table-dropdown-trigger.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.table-dropdown-trigger .table-icon {
    color: var(--primary-color);
    flex-shrink: 0;
}

.table-dropdown-trigger .dropdown-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.table-dropdown-trigger .dropdown-arrow {
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.table-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* 드롭다운 메뉴 */
.table-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    max-width: 280px;
    max-height: 320px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.table-dropdown.open .table-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 드롭다운 메뉴 헤더 */
.dropdown-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-paper);
}

.dropdown-menu-header span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-menu-header .add-table-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dropdown-menu-header .add-table-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* 드롭다운 메뉴 리스트 */
.dropdown-menu-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 6px 0;
}

.dropdown-menu-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu-list::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-menu-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* 드롭다운 메뉴 아이템 */
.dropdown-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.dropdown-menu-item:hover {
    background: var(--primary-light);
}

.dropdown-menu-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.dropdown-menu-item .item-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-tertiary);
    background: var(--bg-app);
    border-radius: 6px;
    flex-shrink: 0;
}

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

.dropdown-menu-item .item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-menu-item .item-check {
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.dropdown-menu-item.active .item-check {
    opacity: 1;
}

/* 드롭다운 아이템 래퍼 (수정 버튼 포함) */
.dropdown-menu-item-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.dropdown-menu-item-wrapper .dropdown-menu-item {
    flex: 1;
    padding-right: 8px;
}

.item-rename-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
}

.dropdown-menu-item-wrapper:hover .item-rename-btn {
    opacity: 1;
}

.item-rename-btn:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

/* 드롭다운 빈 상태 */
.dropdown-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-tertiary);
}

.dropdown-empty svg {
    margin-bottom: 8px;
    opacity: 0.4;
}

.dropdown-empty p {
    font-size: 12px;
    margin: 0;
}

/* 문제풀이 모드 옵션 (통합 바 내부) */
.solve-options {
    pointer-events: auto;
    display: none;
    align-items: center;
    gap: 12px;
}

.solve-options.visible {
    display: flex;
}

.solve-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.solve-option input {
    display: none;
}

.option-switch {
    width: 32px;
    height: 18px;
    background: var(--border-color);
    border-radius: 9px;
    position: relative;
    transition: background 0.2s ease;
}

.option-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.solve-option input:checked+.option-switch {
    background: var(--primary-color);
}

.solve-option input:checked+.option-switch::after {
    transform: translateX(14px);
}

.option-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.reset-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reset-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(34, 197, 94, 0.08);
}

.reset-btn:active {
    transform: scale(0.95);
}

/* 편집 모드 옵션 스타일 */
.edit-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.edit-option input {
    display: none;
}

.edit-option .option-switch {
    width: 32px;
    height: 18px;
    background: var(--border-color);
    border-radius: 9px;
    position: relative;
    transition: background 0.2s ease;
}

.edit-option .option-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.edit-option input:checked+.option-switch {
    background: var(--primary-color);
}

.edit-option input:checked+.option-switch::after {
    transform: translateX(14px);
}

/* 저장 상태 인디케이터 */
.save-status {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 14px;
    background: var(--bg-paper);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.save-status .status-item {
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.save-status .status-item span {
    line-height: 1;
}

.save-status .status-item svg {
    flex-shrink: 0;
}

/* Saved 상태 */
.save-status[data-status="saved"] .status-saved {
    display: flex;
}

.save-status[data-status="saved"] {
    color: var(--success-color);
    border-color: rgba(77, 124, 116, 0.3);
    background: rgba(77, 124, 116, 0.08);
}

/* Saving 상태 */
.save-status[data-status="saving"] .status-saving {
    display: flex;
}

.save-status[data-status="saving"] {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.08);
}

.save-status[data-status="saving"] .spin {
    animation: spinAnimation 1s linear infinite;
}

@keyframes spinAnimation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Offline 상태 */
.save-status[data-status="offline"] .status-offline {
    display: flex;
}

.save-status[data-status="offline"] {
    color: var(--text-tertiary);
    border-color: var(--border-color);
    background: var(--bg-paper);
}

/* Error 상태 */
.save-status[data-status="error"] .status-error {
    display: flex;
}

.save-status[data-status="error"] {
    color: var(--danger-color);
    border-color: rgba(190, 18, 60, 0.3);
    background: rgba(190, 18, 60, 0.08);
    animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(190, 18, 60, 0);
    }

    50% {
        box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.15);
    }
}

/* 수동저장 버튼 */
.manual-save-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.manual-save-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(87, 142, 126, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(87, 142, 126, 0.15);
}

.manual-save-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.manual-save-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.manual-save-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.manual-save-btn:hover svg {
    transform: scale(1.1);
}

/* 저장 중일 때 수동저장 버튼 비활성화 스타일 */
.manual-save-btn.saving {
    pointer-events: none;
    opacity: 0.6;
    color: var(--text-tertiary);
    border-color: var(--border-color);
    background: var(--bg-paper);
}

.manual-save-btn.saving svg {
    animation: spinAnimation 1s linear infinite;
}

/* 버튼 공통 */
.user-table-page .ut-btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    outline: none;
    white-space: nowrap;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.user-table-page .ut-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.user-table-page .ut-btn-primary {
    background: var(--primary-color);
    color: white;
}

.user-table-page .ut-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.user-table-page .ut-btn-primary:active {
    transform: translateY(0);
}

.user-table-page .ut-btn-secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.user-table-page .ut-btn-secondary:hover {
    background: var(--secondary-color);
    border-color: var(--text-tertiary);
}

.user-table-page .ut-btn-small {
    padding: 8px 14px;
    font-size: 13px;
    height: 34px;
}

/* ==========================================
   반응형 디자인 - 모바일 퍼스트
   ========================================== */

/* 태블릿 (최대 900px) */
@media (max-width: 900px) {
    .mode-toggle-container {
        left: 16px;
        right: 16px;
    }

    .unified-mode-bar {
        width: 100%;
        justify-content: center;
    }
}

/* 모바일 태블릿 (최대 768px) */
@media (max-width: 768px) {

    /* 모드 토글 컨테이너 중앙 정렬 */
    .mode-toggle-container {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: auto;
        max-width: calc(100vw - 24px);
    }

    .unified-mode-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .unified-mode-bar::-webkit-scrollbar {
        display: none;
    }

    /* 모드 토글 버튼 컴팩트화 */
    .mode-toggle-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .mode-toggle-btn svg {
        width: 14px;
        height: 14px;
    }

    /* 바 요소들 컴팩트화 */
    .bar-divider {
        margin: 0 6px;
        height: 26px;
    }

    .save-status {
        padding: 5px 10px;
        font-size: 11px;
    }

    .save-status .status-item span {
        display: none;
    }

    .manual-save-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .manual-save-btn span:not(.sr-only) {
        display: none;
    }

    /* 드롭다운 컴팩트화 */
    .table-dropdown-trigger {
        min-width: auto;
        max-width: 120px;
        padding: 5px 10px;
        font-size: 11px;
    }

    .table-dropdown-trigger .dropdown-label {
        max-width: 70px;
    }

    .table-dropdown-menu {
        min-width: 200px;
        max-width: 260px;
        right: -20px;
    }
}

/* 모바일 (최대 640px) */
@media (max-width: 640px) {

    /* 페이지 패딩 조정 */
    .user-table-page {
        --common-header-offset: 56px;
        padding-top: 56px;
    }

    /* 모드 토글 바 - 전체 너비 */
    .mode-toggle-container {
        left: 0;
        right: 0;
        top: 56px;
        transform: none;
        max-width: none;
        padding: 8px 12px;
        background: var(--bg-app);
        border-bottom: 1px solid var(--border-color);
    }

    body.header-hidden .mode-toggle-container {
        top: 0;
    }

    .unified-mode-bar {
        padding: 4px;
        gap: 0;
        width: 100%;
        justify-content: space-between;
        border-radius: 12px;
    }

    /* 모드 토글 더 작게 */
    .mode-toggle {
        padding: 3px;
    }

    .mode-toggle-btn {
        padding: 6px 10px;
        font-size: 11px;
        gap: 4px;
    }

    .mode-toggle-btn svg {
        width: 12px;
        height: 12px;
    }

    /* 저장 상태 아이콘만 표시 */
    .save-status {
        padding: 5px 8px;
        border-radius: 10px;
    }

    .save-status .status-item {
        gap: 0;
    }

    .save-status .status-item span {
        display: none;
    }

    /* 수동저장 아이콘만 */
    .manual-save-btn {
        padding: 6px 8px;
        gap: 0;
    }

    /* 드롭다운 아이콘만 */
    .table-dropdown-trigger {
        padding: 5px 8px;
        min-width: auto;
    }

    .table-dropdown-trigger .dropdown-label {
        display: none;
    }

    .table-dropdown-trigger .table-icon {
        margin-right: 0;
    }

    .table-dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: none;
        min-width: auto;
        border-radius: 16px 16px 0 0;
        max-height: 60vh;
        animation: slideUpModal 0.25s ease-out;
    }

    @keyframes slideUpModal {
        from {
            transform: translateY(100%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .dropdown-menu-header {
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .dropdown-menu-header span {
        font-size: 14px;
    }

    .dropdown-menu-list {
        max-height: calc(60vh - 60px);
        padding: 8px 0;
    }

    .dropdown-menu-item {
        padding: 14px 16px;
        font-size: 15px;
    }

    .dropdown-menu-item .item-index {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    /* 편집/문제풀이 옵션 */
    .edit-options,
    .solve-options {
        gap: 4px;
    }

    .solve-option .option-label {
        display: none;
    }

    .reset-btn {
        padding: 5px 8px;
        font-size: 11px;
    }

    .reset-btn span:not(svg) {
        display: none;
    }
}

/* 초소형 모바일 (최대 480px) */
@media (max-width: 480px) {
    .mode-toggle-container {
        padding: 6px 8px;
    }

    .unified-mode-bar {
        padding: 3px;
        border-radius: 10px;
    }

    /* 모드 토글 최소화 */
    .mode-toggle-btn {
        padding: 5px 8px;
        font-size: 10px;
    }

    .mode-toggle-btn svg {
        width: 11px;
        height: 11px;
    }

    .bar-divider {
        margin: 0 3px;
        height: 20px;
    }

    /* 터치 타겟 최소 44px 유지 */
    .save-status,
    .manual-save-btn,
    .table-dropdown-trigger {
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 모달 전체 화면에 가깝게 */
    .table-dropdown-menu {
        max-height: 70vh;
    }

    .dropdown-menu-item {
        padding: 16px;
    }
}

/* 토스트 알림 */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    min-width: 280px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: toastSlideIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1);
    border-left: 4px solid var(--primary-color);
}

.toast.toast-exit {
    animation: toastSlideOut 0.25s ease forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 16px;
    height: 16px;
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-app);
    color: var(--text-primary);
}

/* 토스트 타입별 스타일 */
.toast.toast-success {
    border-left-color: var(--success-color);
}

.toast.toast-success .toast-icon {
    background: var(--success-bg);
    color: var(--success-color);
}

.toast.toast-error {
    border-left-color: var(--danger-color);
}

.toast.toast-error .toast-icon {
    background: var(--error-bg);
    color: var(--danger-color);
}

.toast.toast-warning {
    border-left-color: var(--warning-color);
}

.toast.toast-warning .toast-icon {
    background: #fef3c7;
    color: var(--warning-color);
}

.toast.toast-info {
    border-left-color: #3b82f6;
}

.toast.toast-info .toast-icon {
    background: #eff6ff;
    color: #3b82f6;
}

/* 모바일 토스트 */
@media (max-width: 480px) {
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}