/* styles.css */
:root {
    /* 🌞 라이트모드 컬러 시스템 */
    --primary: #7F5AF0;
    --primary-dark: #6246C9;
    --primary-light: #D4C6FA;
    --accent: #FF7597;
    --text-primary: #2B2C34;
    --text-secondary: #6B6F82;
    --text-tertiary: #9CA3AF;
    --divider: #E6E8EC;
    --background: #F9FAFB;
    --surface: #FFFFFF;
    --surface-secondary: #F3F4F6;
    --error: #EE4B6A;
    --success: #56CA8C;
    --warning: #FFB547;
    --card-background: #FFFFFF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --placeholder: #9CA3AF;
    --border-radius: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 38px rgba(0, 0, 0, 0.1);
}

/* 🌙 다크모드 컬러 시스템 */
html.dark-mode {
    --primary: #A78BFA;
    --primary-dark: #8B5CF6;
    --primary-light: #C4B5FD;
    --accent: #FB7185;
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-tertiary: #9CA3AF;
    --divider: #374151;
    --background: #111827;
    --surface: #1F2937;
    --surface-secondary: #374151;
    --error: #F87171;
    --success: #6EE7B7;
    --warning: #FBBF24;
    --card-background: #1F2937;
    --border: #374151;
    --border-light: #4B5563;
    --placeholder: #6B7280;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 38px rgba(0, 0, 0, 0.5);
}

/* 🎨 공통 스타일 변수 */
:root {
    --transition: all 0.3s ease;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

/* 🌙 다크모드 글래스 효과 */
html.dark-mode {
    --glass-bg: rgba(31, 41, 55, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* 🌙 다크모드 기본 요소 스타일 */
html.dark-mode {
    color-scheme: dark;
}

html.dark-mode body {
    background-color: var(--background);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 🌙 다크모드 텍스트 색상 표준화 */
html.dark-mode h1,
html.dark-mode h2,
html.dark-mode h3,
html.dark-mode h4,
html.dark-mode h5,
html.dark-mode h6 {
    color: var(--text-primary);
}

html.dark-mode p,
html.dark-mode span,
html.dark-mode div {
    color: var(--text-primary);
}

html.dark-mode .text-secondary {
    color: var(--text-secondary) !important;
}

html.dark-mode .text-tertiary {
    color: var(--text-tertiary) !important;
}

/* 🌙 다크모드 카드 및 표면 */
html.dark-mode .card,
html.dark-mode .surface,
html.dark-mode .modal-content,
html.dark-mode .dropdown-content {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text-primary);
}

/* 🌙 다크모드 입력 필드 */
html.dark-mode input,
html.dark-mode textarea,
html.dark-mode select {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text-primary);
}

html.dark-mode input::placeholder,
html.dark-mode textarea::placeholder {
    color: var(--placeholder);
}

html.dark-mode input:focus,
html.dark-mode textarea:focus,
html.dark-mode select:focus {
    border-color: var(--primary);
    background-color: var(--surface);
}

/* 🌙 다크모드 버튼 */
html.dark-mode .btn-secondary {
    background-color: var(--surface-secondary);
    border-color: var(--border);
    color: var(--text-primary);
}

html.dark-mode .btn-secondary:hover {
    background-color: var(--border-light);
}

/* 🌙 다크모드 테이블 */
html.dark-mode table {
    background-color: var(--surface);
    color: var(--text-primary);
}

html.dark-mode thead {
    background-color: var(--surface-secondary);
    color: var(--text-primary);
}

html.dark-mode thead th {
    color: var(--text-primary) !important;
    font-weight: 600;
    border-color: var(--border);
}

html.dark-mode thead th .header-content {
    color: var(--text-primary) !important;
}

/* 🌙 다크모드 테이블 헤더 강화 - 더 강력한 적용 */
html.dark-mode #wordTable thead th,
html.dark-mode #passTable thead th {
    background-color: var(--surface-secondary) !important;
    color: #F9FAFB !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    border-bottom: 2px solid var(--border) !important;
}

html.dark-mode #wordTable thead th .header-content,
html.dark-mode #passTable thead th .header-content {
    color: #F9FAFB !important;
    font-weight: 700 !important;
}

html.dark-mode #wordTable thead th span,
html.dark-mode #passTable thead th span {
    color: #F9FAFB !important;
}

html.dark-mode tbody tr {
    border-color: var(--divider);
}

html.dark-mode tbody tr:hover {
    background-color: var(--surface-secondary);
}

html.dark-mode tbody td {
    color: var(--text-primary);
    border-color: var(--border);
}

/* 🌙 다크모드 테이블 입력 필드 */
html.dark-mode table input,
html.dark-mode table textarea {
    background-color: var(--surface);
    color: var(--text-primary);
    border-color: var(--border);
}

html.dark-mode table input:focus,
html.dark-mode table textarea:focus {
    background-color: var(--surface);
    color: var(--text-primary);
    border-color: var(--primary);
}

/* 🌙 다크모드 숨기기 기능 - 텍스트를 배경색과 동일하게 */
html.dark-mode .hidden-column input,
html.dark-mode .hidden-column textarea,
html.dark-mode .hidden-column .word-input,
html.dark-mode .hidden-column .meaning-input {
    color: #1F2937 !important;
    background-color: #1F2937 !important;
    text-shadow: none !important;
    border-color: #1F2937 !important;
    caret-color: transparent !important;
}

html.dark-mode .hidden-column input::placeholder,
html.dark-mode .hidden-column textarea::placeholder {
    color: #1F2937 !important;
    opacity: 1 !important;
}

html.dark-mode .hidden-column input::selection,
html.dark-mode .hidden-column textarea::selection {
    background-color: #1F2937 !important;
    color: #1F2937 !important;
}

/* 🌙 다크모드 숨겨진 텍스트 완전 투명화 */
html.dark-mode .vocabulary-table .hidden-column .word-cell,
html.dark-mode .vocabulary-table .hidden-column .meaning-cell,
html.dark-mode .vocabulary-table .hidden-column td {
    color: #1F2937 !important;
    background-color: #1F2937 !important;
}

html.dark-mode .vocabulary-table .hidden-column .word-cell *,
html.dark-mode .vocabulary-table .hidden-column .meaning-cell *,
html.dark-mode .vocabulary-table .hidden-column td * {
    color: #1F2937 !important;
    background-color: #1F2937 !important;
    text-shadow: none !important;
    border: none !important;
    outline: none !important;
}

/* 🌙 다크모드 - 숨겨진 셀의 모든 하위 요소 강제 숨김 */
html.dark-mode .hidden-column td input,
html.dark-mode .hidden-column td textarea,
html.dark-mode .hidden-column td div,
html.dark-mode .hidden-column td span {
    color: #1F2937 !important;
    background-color: #1F2937 !important;
    border-color: #1F2937 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

html.dark-mode .hidden-column td input:focus,
html.dark-mode .hidden-column td textarea:focus {
    color: #1F2937 !important;
    background-color: #1F2937 !important;
    border-color: #1F2937 !important;
    outline: none !important;
}

/* 🌙 다크모드 단어장 테이블 전용 스타일 */
html.dark-mode .vocabulary-table {
    background-color: var(--surface) !important;
    border-color: var(--border) !important;
}

html.dark-mode .vocabulary-table thead {
    background-color: var(--surface-secondary) !important;
}

html.dark-mode .vocabulary-table thead th {
    background-color: var(--surface-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
    font-weight: 600 !important;
}

html.dark-mode .vocabulary-table tbody td {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

html.dark-mode .vocabulary-table tbody tr:hover td {
    background-color: var(--surface-secondary) !important;
}

/* 🌙 다크모드 단어장 버튼 */
html.dark-mode .vocabulary-table button {
    background-color: var(--surface-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

html.dark-mode .vocabulary-table button:hover {
    background-color: var(--border-light) !important;
}

/* 🌙 다크모드 숨기기 아이콘 */
html.dark-mode .hide-btn {
    color: var(--text-secondary) !important;
}

html.dark-mode .hide-btn:hover {
    color: var(--text-primary) !important;
}

/* 🌙 다크모드 새 단어 추가 버튼 */
html.dark-mode #addWordBtn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html.dark-mode #addWordBtn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(167, 139, 250, 0.3) !important;
}

/* 🌙 다크모드 엑셀 저장 버튼 */
html.dark-mode #saveExcelBtn {
    background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%) !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html.dark-mode #saveExcelBtn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3) !important;
}

/* 🌞 라이트모드 새 단어 추가 버튼 호버 효과 강화 */
#addWordBtn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
    color: #FFFFFF !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* 🌞 라이트모드 엑셀 저장 버튼 호버 효과 강화 */
#saveExcelBtn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%) !important;
    color: #FFFFFF !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* 🌙 다크모드 탭 */
html.dark-mode .tab-button {
    color: var(--text-secondary);
    border-color: var(--border);
}

html.dark-mode .tab-button.active,
html.dark-mode .tab-button:hover {
    color: var(--text-primary);
    background-color: var(--surface-secondary);
}

/* 🌙 다크모드 네비게이션 */
html.dark-mode .navbar,
html.dark-mode .header {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text-primary);
}

/* 🌙 다크모드 스크롤바 */
html.dark-mode ::-webkit-scrollbar {
    background-color: var(--surface);
}

html.dark-mode ::-webkit-scrollbar-thumb {
    background-color: var(--border-light);
}

html.dark-mode ::-webkit-scrollbar-thumb:hover {
    background-color: var(--divider);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    background-image: linear-gradient(135deg, #f9fafc 0%, #f0f2f5 100%);
    margin: 0;
    padding: 104px 24px 24px 24px; /* ?�단 ?�딩??80px?�서 104px�?증�? */
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    /* 우측 사전 패널 제거로 단일 컬럼 레이아웃 */
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 24px;
}

/* === ?�면 ?�기�?container-wrapper 반응???�정 === */

/* 초�????�면 (2000px ?�상) - 4K 모니????*/
@media (min-width: 2000px) {
    .container-wrapper {
        max-width: 2200px;  /* 매우 ???�면?�서?????�게 */
        gap: 48px;          /* 간격?????�게 */
    }
}

/* ?�???�면 (1800px - 1999px) - ???�스?�톱 */
@media (min-width: 1800px) and (max-width: 1999px) {
    .container-wrapper {
        max-width: 1900px;  /* ?�???�면 최적??*/
        gap: 40px;
    }
}

/* ???�스?�톱 (1600px - 1799px) - 기본 ?�정 ?��? */
@media (min-width: 1600px) and (max-width: 1799px) {
    .container-wrapper {
        max-width: 1400px;  /* 1200px?�서 1400px�?증�? */
        gap: 32px;
    }
}

/* 중간 ?�스?�톱 (1400px - 1599px) */
@media (min-width: 1400px) and (max-width: 1599px) {
    .container-wrapper {
        max-width: 1200px;  /* 1000px?�서 1200px�?증�? */
        gap: 28px;
    }
}

/* ?��? ?�스?�톱 (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .container-wrapper {
        max-width: 1000px;  /* 800px?�서 1000px�?증�? */
        gap: 24px;
    }
}

/* ???�블�?(992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container-wrapper {
        max-width: 95%;     /* ?�면??95% ?�용 */
        gap: 20px;
        padding: 0 20px;   /* 좌우 ?�딩 추�? */
    }
}

/* ?�블�?(768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container-wrapper {
        max-width: 90%;     /* ?�면??90% ?�용 */
        gap: 16px;
        padding: 0 15px;
    }
}

/* ??모바??(576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .container-wrapper {
        max-width: 95%;     /* ?�면??95% ?�용 */
        gap: 12px;
        padding: 0 10px;
    }
}

/* ?��? 모바??(575px ?�하) */
@media (max-width: 575px) {
    .container-wrapper {
        max-width: 100%;    /* ?�체 ?�면 ?�용 */
        gap: 8px;
        padding: 0 8px;
        margin: 0;
    }
}

/* 매우 ?��? ?�면 (320px ?�하) */
@media (max-width: 320px) {
    .container-wrapper {
        max-width: 100%;
        gap: 4px;
        padding: 0 4px;
        margin: 0;
    }
}

/* 가�?모드 ?�??(?�이가 ??? ?�면) */
@media screen and (orientation: landscape) and (max-height: 600px) {
    .container-wrapper {
        max-width: 95%;
        gap: 16px;
    }
}

.container {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 32px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.container:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

h1 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
}

/* ?�션 ?�목 ?��???*/
.section-title {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* ?��? ?�일 ?�로???�역 */
.excel-import {
    border: 2px dashed var(--divider);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.excel-import:hover {
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

.excel-import.minimized {
    height: 0;
    padding: 0;
    border: none;
    opacity: 0;
}

.or-divider {
    color: var(--text-secondary);
    margin: 20px 0 10px;
    position: relative;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.or-divider:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.or-divider::after {
    content: "!";
    font-size: 12px;
    margin-left: 8px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.or-divider.minimized::after {
    transform: rotate(-180deg);
}

.file-upload {
    position: relative;
    padding: 24px;
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(5px);
}

.file-upload input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.file-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* ?�래?�카???�역 */
.flashcard-container {
    margin: 30px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.word-counter {
    text-align: right;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--glass-bg);
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

/* ?�로그레?�바 ?��???*/
.progress-container {
    width: 100%;
    height: 30px;
    display: flex;
    align-items: center;
    position: relative;
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 10px;
    margin-bottom: 24px;
    position: relative;
    cursor: pointer;
}

.progress-bar:hover {
    height: 8px;
    transition: height 0.2s ease;
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    position: relative;
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-point {
    width: 14px;
    height: 14px;
    background-color: #5e72e4;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    transition: width 0.2s, height 0.2s, box-shadow 0.2s;
    z-index: 5;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.progress-point:hover, .progress-point.dragging {
    width: 18px;
    height: 18px;
    box-shadow: 0 0 8px rgba(94, 114, 228, 0.6);
}

.progress-tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: opacity 0.2s, visibility 0.2s;
    bottom: 100%;
    margin-bottom: 8px;
    /* 기본?�으�??�큅 ?��? */
    display: none;
}

.progress-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* ?�래?�카???��???개선 */
.flashcard {
    background: var(--surface);
    border: none;
    border-radius: 24px; /* ?�근 모서�?*/
    padding: 20px;
    text-align: center;
    font-size: 36px; /* ????글�?*/
    font-weight: 700; /* ???�꺼??글�?*/
    margin-bottom: 20px;
    min-height: 200px; /* ?�이 ?�간 증�? */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(127, 93, 240, 0.12); /* 그림???�과 강화 */
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--primary);
}

.flashcard .word {
    font-size: 42px;
    color: var(--primary);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.flashcard .meaning {
    font-size: 32px;
    color: var(--accent);
    font-weight: 600;
}

.flashcard.hidden-mode {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flashcard .question-mark {
    font-size: 72px;
    color: var(--primary-light);
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.flashcard.disabled {
    background: var(--divider);
    color: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: var(--shadow-sm);
}

.flashcard:not(.disabled):hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), 0 15px 35px rgba(127, 93, 240, 0.18);
}

/* 버튼 ?��???*/
.primary-button, #previous-card, #next-card, #show-answer, #answer, #start-learning {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.primary-button:hover, #previous-card:hover, #next-card:hover, #show-answer:hover, #answer:hover, #start-learning:hover {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

button:disabled {
    background: var(--divider);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 발음 ?�정 ?�역 */
.pronunciation-settings {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 36px;
    border-radius: var(--border-radius);
    margin-bottom: 36px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--glass-border);
}

.pronunciation-controls {
    display: grid;
    gap: 20px;
}

.pronunciation-controls label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.pronunciation-controls input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--divider);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.pronunciation-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.pronunciation-source {
    margin-top: 15px;
}

.pronunciation-source select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--divider);
    border-radius: 12px;
    background: var(--surface);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.pronunciation-source select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.auto-next-setting {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auto-next-setting input[type="checkbox"] {
    -webkit-appearance: none;
    width: 44px;
    height: 24px;
    background: var(--divider);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.auto-next-setting input[type="checkbox"]::before {
    content: '';
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

.auto-next-setting input[type="checkbox"]:checked {
    background: var(--primary);
}

.auto-next-setting input[type="checkbox"]:checked::before {
    left: 22px;
}

/* ?�전 ?�역 */
/* 사전 컨테이너 제거됨 - 우측 패널 삭제
.dictionary-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    position: relative;
    height: calc(100vh - 48px);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
*/

.resize-handle {
    position: absolute;
    left: -5px;
    top: 0;
    width: 10px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 10;
    /* ?�시�?리사?�즈 ?�들 ?�기�?*/
    display: none !important;
}

.dictionary-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 12px 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--divider);
}

.dictionary-tabs .tab-button {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: var(--transition);
}

.dictionary-tabs .tab-button.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.dictionary-tabs .tab-button:not(.active):hover {
    background: rgba(127, 90, 240, 0.1);
    color: var(--primary);
}

.dictionary-frame {
    width: 100%;
    height: calc(100% - 54px);
    border: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.dictionary-links {
    margin-top: 10px;
    text-align: center;
}

.dict-link {
    color: var(--primary);
    text-decoration: none;
    margin: 0 10px;
}

.dict-link:hover {
    text-decoration: underline;
}

/* 반응???�자??*/
@media (max-width: 1200px) {
    .container-wrapper {
        max-width: 95%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    .flashcard-controls {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    body {
        padding: 12px;
    }
    .container {
        padding: 16px;
    }
    .flashcard {
        min-height: 200px;
        font-size: 1.4rem;
    }
}

.word-count {
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
    transition: color 0.3s ease;
    color: var(--text-secondary);
    font-weight: 500;
}

.flashcard-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.dict-button {
    background-color: rgba(127, 90, 240, 0.1);
    color: var(--primary);
    padding: 8px 12px;
    height: 40px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.dict-button:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dict-button:disabled {
    background-color: var(--divider);
    cursor: not-allowed;
}

.dictionary-buttons {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.dict-button {
    flex: 1;
    min-width: 100px;
    max-width: 150px;
}

/* ??메뉴 ?��???*/
.tab-menu {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--divider);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-menu::-webkit-scrollbar {
    display: none;
}

.inner-tab-menu {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    margin-top: -10px;
    border-bottom: 2px solid rgba(127, 61, 255, 0.1);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 8px;
}

.inner-tab-menu::-webkit-scrollbar {
    display: none;
}

.tab-button, .inner-tab-button {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-button:hover, .inner-tab-button:hover {
    color: var(--primary);
}

.active-tab {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary);
}

.active-inner-tab {
    color: var(--primary) !important;
}

.inner-tab-button.active-inner-tab {
    color: var(--primary) !important;
    position: relative;
}

.inner-tab-button.active-inner-tab::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 3px 3px 0 0;
}

.tab-content, .inner-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

.active-tab + .tab-content, .active-inner-tab + .inner-tab-content {
    display: block;
}

/* ?�이�??��???*/
table {
    table-layout: fixed;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 8px;
}

th, td {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

th {
    padding: 1.2rem 1rem;
    background-color: rgba(127, 61, 255, 0.05);
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    height: 30px;
    text-align: center;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.no-column {
    width: 20px;
    text-align: center;
}

.word-column {
    width: 30%;
}

.meaning-column {
    width: auto;
}

.action-column {
    width: 50px;
    text-align: right;
}

td:first-child {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
}

td:last-child {
    text-align: right;
    padding-right: 16px;
}

/* ?�력 ?�드 ?��???*/
input[type="text"] {
    width: calc(100% - 16px);
    box-sizing: border-box;
    padding: 0.8rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(127, 61, 255, 0.05);
    box-shadow: 0 0 0 2px rgba(127, 61, 255, 0.2);
}

input[type="password"] {
    width: calc(100% - 16px);
    box-sizing: border-box;
    padding: 0.8rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(127, 61, 255, 0.05);
    box-shadow: 0 0 0 2px rgba(127, 61, 255, 0.2);
}

.button-group {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2;
    padding: 16px 0;
    border-radius: 12px;
}

#addWordBtn, #saveExcelBtn {
    height: 50px;
    padding: 0 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    box-shadow: var(--shadow-sm);
}

#addWordBtn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    flex: 1;
    border: none;
}

/* 🌞 라이트모드에서 새 단어 추가 버튼 강화 */
#addWordBtn {
    color: #FFFFFF !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
}

#saveExcelBtn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    flex: 1;
    border: none;
}

/* 🌞 라이트모드에서 엑셀 저장 버튼 강화 */
#saveExcelBtn {
    color: #FFFFFF !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
}

#addWordBtn:hover, #saveExcelBtn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.delete-btn {
    background-color: transparent;
    color: var(--danger-color);
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background-color: rgba(254, 69, 69, 0.1);
    transform: scale(1.1);
}

.delete-btn i {
    pointer-events: none;
}

/* Pass ?�이�??��???*/
.pass-btn {
    background-color: transparent;
    color: var(--success);
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

.pass-btn:hover {
    background-color: rgba(86, 202, 140, 0.1);
    transform: scale(1.1);
}

/* ?�션 버튼 컨테?�너 */
.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Pass ?�이�??� ?�렬 ?��???추�? */
#passTable td:nth-child(2) {  /* ?�어 ??*/
    text-align: center;
}

#passTable td:nth-child(3) {  /* ?��? ??*/
    text-align: left;
}

/* ?�팁 ?��???*/
.pass-btn, .delete-btn {
    position: relative;
}

[title] {
    cursor: help;
}

/* 커스텀 툴팁 시스템 (data-tooltip 사용) */
[data-tooltip] {
    position: relative;
    cursor: help;
}

/* 커스텀 툴팁 스타일 (열 전환 버튼과 숨기기 버튼 제외) */
/* [data-tooltip]:not(.swap-columns-btn):not(.hide-column-btn):hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: rgba(43, 44, 52, 0.95);
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeIn 0.2s ease-out;
} */

/* 툴팁 화살표 (열 전환 버튼과 숨기기 버튼 제외) */
/* [data-tooltip]:not(.swap-columns-btn):not(.hide-column-btn):hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(43, 44, 52, 0.95);
    z-index: 10001;
} */

/* 툴팁 애니메이션 */
@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 열 전환 버튼 - 툴팁을 좌측에 표시 */
.swap-columns-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    right: 120%;
    left: auto;
    bottom: auto;
    transform: translateY(-50%);
    padding: 8px 12px;
    background-color: rgba(43, 44, 52, 0.95);
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeInLeft 0.2s ease-out;
}

/* 열 전환 버튼 - 툴팁 화살표를 우측에 */
/* .swap-columns-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    left: auto;
    bottom: auto;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(43, 44, 52, 0.95);
    border-top-color: transparent;
    z-index: 10001;
} */

/* 좌측 툴팁 애니메이션 */
@keyframes tooltipFadeInLeft {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(5px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* 숨기기 버튼들의 툴팁 스타일 */
.hide-column-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: rgba(43, 44, 52, 0.95);
    color: white;
    font-size: 11px;
    font-weight: 500;
    border-radius: 5px;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeIn 0.2s ease-out;
}

/* 숨기기 버튼들의 툴팁 화살표 */
.hide-column-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(43, 44, 52, 0.95);
    z-index: 10001;
}

/* ?�이�?컨테?�너???�???��???추�? */
#vocabulary-content {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding-right: 5px;
    border-radius: 8px;
}

/* ?�이�??�더�?고정?�기 ?�한 ?��???*/
#wordTable {
    width: 100%;
    border-collapse: collapse;
}

#wordTable thead {
    position: sticky;
    top: 60px;
    background-color: white;
    z-index: 1;
}

/* ?�크롤바 ?��??�링 */
#vocabulary-content::-webkit-scrollbar {
    width: 8px;
}

#vocabulary-content::-webkit-scrollbar-track {
    background: rgba(240, 242, 245, 0.8);
    border-radius: 4px;
}

#vocabulary-content::-webkit-scrollbar-thumb {
    background: rgba(127, 90, 240, 0.6);
    border-radius: 4px;
}

#vocabulary-content::-webkit-scrollbar-thumb:hover {
    background: rgba(127, 90, 240, 0.8);
}

/* ?�기�??�이�??��???*/
.hide-column-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: 4px;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.hide-column-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.hide-column-btn i {
    font-size: 14px;
}

/* 열 전환 버튼 */
.swap-columns-btn {
    padding: 6px 8px;
    border: 1px solid var(--divider);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
}

/* 열 전환 버튼 아이콘 */
.swap-columns-btn i {
    font-size: 14px;
    z-index: 1;
    position: relative;
}

.swap-columns-btn:hover {
    background: rgba(127, 61, 255, 0.1);
    color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

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





/* ?�겨�??�스???��???*/
.hidden-text {
    color: transparent;
}

/* 🌙 다크모드 숨겨진 텍스트 - hidden-text 클래스 전용 */
html.dark-mode .hidden-text {
    color: #1F2937 !important;
    background-color: #1F2937 !important;
    text-shadow: none !important;
    border-color: #1F2937 !important;
    caret-color: transparent !important;
}

html.dark-mode .hidden-text::placeholder {
    color: #1F2937 !important;
    opacity: 1 !important;
}

html.dark-mode .hidden-text::selection {
    background-color: #1F2937 !important;
    color: #1F2937 !important;
}

html.dark-mode .hidden-text:focus {
    color: #1F2937 !important;
    background-color: #1F2937 !important;
    border-color: #1F2937 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 🌙 다크모드 - 테이블 셀 전체가 숨겨질 때를 위한 추가 보강 */
html.dark-mode table td.hidden-column,
html.dark-mode #wordTable td.hidden-column,
html.dark-mode #passTable td.hidden-column {
    background-color: #1F2937 !important;
    color: #1F2937 !important;
}

html.dark-mode table td.hidden-column *,
html.dark-mode #wordTable td.hidden-column *,
html.dark-mode #passTable td.hidden-column * {
    background-color: #1F2937 !important;
    color: #1F2937 !important;
    border-color: #1F2937 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

/* 🌙 다크모드 - 컬럼 레벨 숨기기 (th + td 모두) */
html.dark-mode th.hidden-column,
html.dark-mode td.hidden-column {
    background-color: #1F2937 !important;
    color: #1F2937 !important;
    border-color: #374151 !important;
}

html.dark-mode th.hidden-column *,
html.dark-mode td.hidden-column * {
    background-color: #1F2937 !important;
    color: #1F2937 !important;
    text-shadow: none !important;
    border: none !important;
}

/* 🌙 다크모드 문장 번역기 */
html.dark-mode #translator-panel {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

html.dark-mode .translator-header {
    color: var(--text-primary) !important;
}

html.dark-mode .translator-header strong {
    color: var(--text-primary) !important;
}

html.dark-mode .translator-header span {
    color: var(--text-secondary) !important;
}

html.dark-mode #translator-toggle-icon {
    color: var(--text-secondary) !important;
}

html.dark-mode .translator-body {
    border-color: var(--border) !important;
}

html.dark-mode .translator-body label {
    color: var(--text-secondary) !important;
}

html.dark-mode #translator-input {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

html.dark-mode #translator-input::placeholder {
    color: var(--text-tertiary) !important;
}

html.dark-mode #translator-input:focus {
    background-color: var(--surface) !important;
    border-color: var(--primary) !important;
    color: var(--text-primary) !important;
}

html.dark-mode #translator-output {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

html.dark-mode #translator-run {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

html.dark-mode #translator-run:hover {
    background-color: var(--primary-dark) !important;
}

html.dark-mode #translator-run:disabled {
    background-color: var(--text-tertiary) !important;
    color: var(--text-secondary) !important;
}

/* 🌙 다크모드 번역기 출력 영역의 단어 스팬 */
html.dark-mode #translator-output span {
    color: var(--text-primary) !important;
    background-color: transparent !important;
}

html.dark-mode #translator-output span:hover {
    background-color: var(--surface-secondary) !important;
    color: var(--primary) !important;
    cursor: pointer;
}

/* 🌙 다크모드 번역기 하단 안내 텍스트 */
html.dark-mode .translator-body div {
    color: var(--text-secondary) !important;
}

html.dark-mode .translator-body b {
    color: var(--text-primary) !important;
}

/* 🌙 다크모드 번역기 아이콘 */
html.dark-mode .translator-header .fas.fa-language {
    color: var(--primary) !important;
}

/* 🌙 다크모드 인증 모달 */
html.dark-mode .auth-modal {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

html.dark-mode .auth-modal-content {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
}

html.dark-mode .auth-modal-header h2 {
    color: var(--text-primary) !important;
}

html.dark-mode .auth-modal-close {
    color: var(--text-secondary) !important;
    background: var(--surface) !important;
}

html.dark-mode .auth-modal-close:hover {
    background: var(--surface-secondary) !important;
    color: var(--text-primary) !important;
}

/* 🌙 다크모드 입력 필드 */
html.dark-mode .input-group label {
    color: var(--text-primary) !important;
}

html.dark-mode .input-group input {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

html.dark-mode .input-group input::placeholder {
    color: var(--text-tertiary) !important;
}

html.dark-mode .input-group input:focus {
    background-color: var(--surface) !important;
    border-color: var(--primary) !important;
    color: var(--text-primary) !important;
}

html.dark-mode .input-icon {
    color: var(--text-secondary) !important;
}

html.dark-mode .password-toggle {
    color: var(--text-secondary) !important;
}

html.dark-mode .password-toggle:hover {
    color: var(--text-primary) !important;
}

/* 🌙 다크모드 체크박스 */
html.dark-mode .remember-me {
    color: var(--text-primary) !important;
}

html.dark-mode .checkmark {
    background-color: var(--surface) !important;
    border-color: var(--border) !important;
}

html.dark-mode .remember-me input:checked ~ .checkmark {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* 🌙 다크모드 링크 */
html.dark-mode .auth-links a {
    color: var(--text-secondary) !important;
}

html.dark-mode .auth-links a:hover {
    color: var(--primary) !important;
}

html.dark-mode .auth-links .divider {
    color: var(--text-tertiary) !important;
}

/* 🌙 다크모드 구분선 */
html.dark-mode .auth-divider {
    color: var(--text-secondary) !important;
}

html.dark-mode .auth-divider::before,
html.dark-mode .auth-divider::after {
    background: var(--border) !important;
}

/* 🌙 다크모드 전환 버튼 */
html.dark-mode .auth-switch-btn {
    color: var(--text-secondary) !important;
}

html.dark-mode .auth-switch-btn:hover {
    background: var(--surface-secondary) !important;
    color: var(--primary) !important;
}

html.dark-mode .auth-switch-btn strong {
    color: var(--primary) !important;
}

/* 🌙 다크모드 소셜 로그인 버튼 */
html.dark-mode .social-login-btn.google {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

html.dark-mode .social-login-btn.google:hover {
    background: var(--surface-secondary) !important;
    border-color: var(--primary) !important;
}

html.dark-mode .social-login-btn.google i {
    color: #4285f4 !important;
}

/* 🌙 다크모드 약관동의/회원가입 */
html.dark-mode .terms-header h3,
html.dark-mode .signup-header h3 {
    color: var(--text-primary) !important;
}

html.dark-mode .terms-header p,
html.dark-mode .signup-header p {
    color: var(--text-secondary) !important;
}

html.dark-mode .terms-icon,
html.dark-mode .signup-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: white !important;
}

/* 🌙 다크모드 약관 체크박스 */
html.dark-mode .terms-item {
    background-color: var(--surface) !important;
    border-color: var(--border) !important;
}

html.dark-mode .terms-item label {
    color: var(--text-primary) !important;
}

html.dark-mode .terms-item .checkmark {
    background-color: var(--surface) !important;
    border-color: var(--border) !important;
}

html.dark-mode .terms-item input:checked ~ .checkmark {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

html.dark-mode .terms-item .required {
    color: var(--error) !important;
}

html.dark-mode .privacy-link {
    color: var(--primary) !important;
}

html.dark-mode .privacy-link:hover {
    color: var(--primary-dark) !important;
}

/* 🌙 다크모드 이전 버튼 */
html.dark-mode .auth-back-btn {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}

html.dark-mode .auth-back-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: var(--surface-secondary) !important;
}

/* 🌙 다크모드 검증 헤더 */
html.dark-mode .verify-header h3 {
    color: var(--text-primary) !important;
}

html.dark-mode .verify-header p {
    color: var(--text-secondary) !important;
}

html.dark-mode .verify-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: white !important;
}

/* 🌙 다크모드 전화번호 입력 */
html.dark-mode .phone-input-container {
    background-color: var(--surface) !important;
    border-color: var(--border) !important;
}

html.dark-mode .phone-input-container input {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
}

html.dark-mode .phone-prefix {
    color: var(--text-secondary) !important;
    background-color: var(--surface-secondary) !important;
    border-color: var(--border) !important;
}

/* ?�이�??�태 변�?*/
.hide-column-btn.active i {
    color: var(--primary);
}

.hide-column-btn.active i:before {
    content: "\f070"; /* fa-eye-slash ?�이콘으�?변�?*/
}

/* ?�습 범위 ?�정???�한 ?��???*/
.study-range-settings {
    background: var(--glass-bg);
    padding: 36px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin: 36px auto;
    max-width: 1000px;
    width: 90%;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.study-range-settings h3 {
    margin-top: 0;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.slider-wrapper {
    width: 100%;
    display: inline-block;
    position: relative;
    padding: 50px 0 30px;
}

.ui-slider {
    background: var(--divider);
    border: none;
    height: 6px;
    position: relative;
    border-radius: 100px;
}

.ui-slider-range {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    height: 6px;
    position: absolute;
    border-radius: 100px;
}

.ui-slider-handle {
    background: white;
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    display: block;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10;
    cursor: grab;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--primary);
    transition: transform 0.2s;
}

.ui-slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.ui-slider-handle:active {
    cursor: grabbing;
}

.range-wrapper {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.range {
    background: var(--surface);
    white-space: nowrap;
    border: 1px solid var(--divider);
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    z-index: 10;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.selected-range {
    font-size: 15px;
    text-align: center;
    color: var(--primary-color);
    margin-top: 8px;
    font-weight: 500;
}

.marker {
    position: absolute;
    top: 100%;
    padding-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    transform: translateX(-50%);
    font-weight: 500;
}

.marker-0 { left: 0; }
.marker-100 { right: 0; transform: translateX(50%); }

/* ?�이�????�버 ?�과 */
tr:hover {
    background-color: rgba(127, 61, 255, 0.03);
}

/* ?�어 ?�택 ?�?�트 ?��???*/
.lang-select {
    padding: 4px 8px;
    border: 1px solid rgba(127, 61, 255, 0.3);
    border-radius: 6px;
    font-size: 0.8rem;
    background-color: white;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.lang-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(127, 61, 255, 0.1);
}

/* ?�력 ?�드 ?�어�??��???*/
.korean-input {
    font-family: 'Nanum Gothic', sans-serif;
    ime-mode: active;
}

.english-input {
    font-family: 'Inter', sans-serif;
    ime-mode: disabled;
}

/* ?�력 ?�드 ?�레?�스?�???��???*/
input::placeholder {
    color: #a0a8b9;
    font-size: 0.9em;
}

/* ?�어 ?�력 ?�드 ?�렬 */
.word-input {
    text-align: center;
}

/* ?��? ?�력 ?�드??기존 ?�쪽 ?�렬 ?��? */
.meaning-input {
    text-align: left;
}

.inner-tab-button {
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    margin-right: 8px;
}

.inner-tab-button:hover {
    color: var(--primary);
}

.inner-tab-button.active-inner-tab {
    color: var(--primary) !important;
    position: relative;
}

.inner-tab-button.active-inner-tab::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 3px 3px 0 0;
}

#vocabulary-tab h1 {
    margin-bottom: 16px;
}

/* ?�시 모드 ?�디??버튼 ?��???*/
.display-mode-settings {
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    padding: 36px;
    margin-bottom: 36px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(5px);
}

.display-mode-settings h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.display-mode-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.radio-option {
    position: relative;
    margin-right: 10px;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-option label {
    display: inline-block;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--divider);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option input[type="radio"]:checked + label {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(127, 90, 240, 0.3);
}

.radio-option input[type="radio"]:focus + label {
    box-shadow: 0 0 0 2px rgba(127, 90, 240, 0.4);
}

.radio-option label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .display-mode-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .radio-option {
        margin-right: 0;
        margin-bottom: 8px;
    }
}

/* ?�레?�어 컨트�??��???*/
.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.main-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    padding: 12px 24px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
}

.main-controls:hover {
    box-shadow: 0 10px 40px rgba(31, 38, 135, 0.2);
    transform: translateY(-2px);
}

.player-button {
    background: transparent;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
}

.player-button:hover:not(:disabled) {
    background: rgba(127, 90, 240, 0.1);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.player-button:active:not(:disabled) {
    transform: scale(0.95);
}

.player-button:disabled {
    color: var(--text-secondary);
    opacity: 0.5;
    cursor: not-allowed;
}

.play-button {
    width: 72px;
    height: 72px;
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 24px;
    box-shadow: 0 8px 20px rgba(127, 90, 240, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.6);
    transform-origin: center;
    position: relative;
    z-index: 1;
}

.play-button:hover {
    transform: scale(1.05);
    background: linear-gradient(145deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: 0 10px 25px rgba(127, 90, 240, 0.4);
}

.play-button.playing {
    background: linear-gradient(145deg, var(--accent) 0%, var(--error) 90%);
    animation: pulse-play 2s infinite ease-in-out;
}

.play-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(127, 90, 240, 0.6);
    z-index: -1;
    opacity: 0;
    transform: scale(1);
    animation: none;
}

.play-button.playing .play-pulse {
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    80%, 100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

@keyframes pulse-play {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 64, 129, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 64, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 64, 129, 0);
    }
}

.repeat-control {
    position: relative;
    display: flex;
    align-items: center;
}

.repeat-control .player-button {
    background: transparent;
    transition: all 0.3s ease;
}

.repeat-control .player-button.active {
    color: var(--accent);
    animation: spin 0.5s ease-out;
}

/* 반복 횟수 표시 스타일 추가 */
.repeat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4081;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 11;
}
/* ------------------------------------------------------------------------------------------------------------ */
/* .repeat-control .repeat-badge.visible {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    background-color: #ff4081 !important;
    color: white !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    font-weight: bold !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    box-shadow: 0 2px 8px rgba(255, 64, 129, 0.4) !important;
    pointer-events: none !important;
} */
/* ------------------------------------------------------------------------------------------------------------------- */
.repeat-badge.visible {
    opacity: 1;
    visibility: visible;
}

/* 더 구체적인 선택자로 강제 적용 */
/* .player-controls .repeat-control .repeat-badge.visible {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
} */
/* -------------------------------------------------------------------------------------------------------------------- */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.repeat-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    min-width: 70px;
}

/* 호버 효과 제거 - 모든 동작은 JavaScript로 제어하기 위해 */
/* .repeat-control:hover .repeat-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
} */

.repeat-dropdown select {
    border: none;
    padding: 8px 12px;
    border-radius: 12px;
    background-color: var(--background);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    width: 100%;
}

.repeat-dropdown select:focus {
    box-shadow: 0 0 0 2px var(--primary-light);
}

.auto-play-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 100px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
}

.auto-play-indicator.active {
    background: linear-gradient(to right, rgba(127, 90, 240, 0.1), rgba(255, 64, 129, 0.1));
    border: 1px solid rgba(127, 90, 240, 0.2);
    box-shadow: 0 6px 16px rgba(127, 90, 240, 0.15);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    0% {
        box-shadow: 0 6px 16px rgba(127, 90, 240, 0.15);
    }
    100% {
        box-shadow: 0 8px 24px rgba(127, 90, 240, 0.3);
    }
}

.auto-play-indicator:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.auto-play-indicator input[type="checkbox"] {
    -webkit-appearance: none;
    width: 46px;
    height: 24px;
    background: rgba(200, 200, 200, 0.5);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auto-play-indicator input[type="checkbox"]::before {
    content: '';
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.auto-play-indicator input[type="checkbox"]:checked {
    background: linear-gradient(to right, var(--primary), var(--accent));
}

.auto-play-indicator input[type="checkbox"]:checked::before {
    left: 24px;
    box-shadow: 0 2px 5px rgba(127, 90, 240, 0.3);
}

.auto-play-indicator label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .main-controls {
        flex-wrap: wrap;
        justify-content: center;
        padding: 12px;
    }
    
    .player-button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .play-button {
        width: 56px;
        height: 56px;
    }
    
    .dictionary-buttons {
        gap: 6px;
    }
    
    .dict-button {
        min-width: 90px;
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .main-controls {
        gap: 8px;
    }
    
    .player-button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .play-button {
        width: 48px;
        height: 48px;
    }
    
    .dictionary-buttons {
        gap: 4px;
    }
    
    .dict-button {
        min-width: 80px;
        max-width: 100px;
        font-size: 0.85rem;
    }
}

/* 기존 딕셔너리 버튼 스타일 유지 */
.dict-button {
    background-color: rgba(127, 90, 240, 0.1);
    color: var(--primary);
    padding: 8px 12px;
    height: 40px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.dict-button:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dict-button:disabled {
    background-color: var(--divider);
    cursor: not-allowed;
}

/* === ?�상??브라?��? ?�이�??�어 === */

/* ???�스?�톱 (1600px ?�상) */
@media (min-width: 1600px) {
    .container-wrapper {
        max-width: 1300px;
        /* 단일 컬럼 레이아웃으로 변경 */ /* ???�면?�서???�전?????�게 */
        gap: 40px;
    }
    
    .container {
        padding: 40px;
    }
    
    .flashcard {
        min-height: 220px;
        font-size: 2rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
}

/* 중간 ?�스?�톱 (1200px - 1599px) */
@media (min-width: 1200px) and (max-width: 1599px) {
    .container-wrapper {
        /* 단일 컬럼 레이아웃으로 변경 */ /* 중간 ?�기 */
        gap: 28px;
    }
    
    .flashcard {
        min-height: 200px;
        font-size: 1.8rem;
    }
}

/* ?��? ?�스?�톱 (900px - 1199px) */
@media (min-width: 900px) and (max-width: 1199px) {
    .container-wrapper {
        /* 단일 컬럼 레이아웃으로 변경 */ /* ?�일???�기 */
    }
    
    .dictionary-container {
        margin-top: 20px;
        height: 400px;
    }
    
    .flashcard {
        min-height: 180px;
        font-size: 1.6rem;
    }
    
    .dict-button {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* ?�블�??�로 (600px - 899px) */
@media (min-width: 600px) and (max-width: 899px) {
    .container {
        padding: 24px;
    }
    
    .flashcard {
        min-height: 160px;
        font-size: 1.4rem;
    }
    
    .main-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .dictionary-buttons {
        gap: 6px;
        justify-content: space-around;
    }
    
    .dict-button {
        padding: 10px;
        font-size: 0.85rem;
        min-width: 70px;
        max-width: 120px;
    }
}

/* ??모바??(480px - 599px) */
@media (min-width: 480px) and (max-width: 599px) {
    .flashcard {
        min-height: 150px;
        font-size: 1.3rem;
        padding: 20px 15px;
    }
    
    .player-button {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .tab-button, .inner-tab-button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}

/* ?��? 모바??(320px - 479px) */
@media (max-width: 479px) {
    body {
        padding: 8px;
    }
    
    .container {
        padding: 12px;
        border-radius: 12px;
    }
    
    .flashcard {
        min-height: 140px;
        font-size: 1.2rem;
        padding: 15px 10px;
    }
    
    .main-controls {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .player-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .dictionary-buttons {
        flex-direction: column;
        gap: 6px;
    }
    
    .dict-button {
        padding: 12px;
        font-size: 0.8rem;
        width: 100%;
        min-width: auto;
        max-width: none;
        flex: none;
    }
    
    .tab-button, .inner-tab-button {
        padding: 8px 12px;
        font-size: 0.8rem;
        flex: 1;
        min-width: 0;
    }
    
    h1 {
        font-size: 1.6rem;
        margin-bottom: 16px;
    }
    
    .word-counter {
        font-size: 12px;
        padding: 3px 8px;
    }
}

/* 매우 ?��? ?�면 (320px ?�하) */
@media (max-width: 320px) {
    .flashcard {
        min-height: 120px;
        font-size: 1.1rem;
        padding: 12px 8px;
    }
    
    .main-controls {
        gap: 8px;
    }
    
    .player-button {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    h1 {
        font-size: 1.4rem;
    }
}

/* 가�?모드 ?�??*/
@media screen and (orientation: landscape) and (max-height: 500px) {
    .flashcard {
        min-height: 100px;
        font-size: 1.1rem;
    }
    
    .container {
        padding: 16px;
    }
    
    .main-controls {
        flex-direction: row;
        justify-content: center;
    }
    
    .dictionary-container {
        display: none; /* 가�?모드?�서???�전 ?��? */
    }
}

/* ==========================================
   로그???�원가??모달 �??�증 ?�스???��???   ========================================== */

/* ?�더�??��???*/
.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--divider);
    padding: 16px 24px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-logo h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.user-controls {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.login-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(127, 90, 240, 0.3);
}

.login-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 90, 240, 0.4);
}

.login-button i {
    font-size: 1rem;
}

/* 로그아웃 버튼 스타일 */
.logout-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--error);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(238, 75, 106, 0.3);
    margin-right: 12px; /* 로그인 버튼과의 간격 */
}

.logout-button:hover {
    background: #d63447;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 75, 106, 0.4);
}

.logout-button i {
    font-size: 1rem;
}

/* body 상단 여백 추가 (헤더용) */
body {
    padding-top: 80px;
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    background-image: linear-gradient(135deg, #f9fafc 0%, #f0f2f5 100%);
    margin: 0;
    padding: 104px 24px 24px 24px; /* ?�단 ?�딩 증�? */
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========================
   소셜 로그인 버튼 스타일
   ======================== */

.social-login-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.social-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 48px;
}

.social-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-login-btn i {
    font-size: 18px;
    min-width: 20px;
}

/* Google 버튼 */
.social-login-btn.google {
    background: #fff;
    color: #333;
    border-color: #ddd;
}

.social-login-btn.google:hover {
    background: #f8f9fa;
    border-color: #4285f4;
}

.social-login-btn.google i {
    color: #4285f4;
}

/* 카카오 버튼 */
.social-login-btn.kakao {
    background: #fee500;
    color: #191919;
    border-color: #fee500;
}

.social-login-btn.kakao:hover {
    background: #ffd43b;
}

.social-login-btn.kakao i {
    color: #191919;
}

/* Facebook 버튼 */
.social-login-btn.facebook {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.social-login-btn.facebook:hover {
    background: #166fe5;
}

/* Twitter 버튼 */
.social-login-btn.twitter {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.social-login-btn.twitter:hover {
    background: #1991db;
}

/* 모바일 대응 */
@media (max-width: 480px) {
    .social-login-btn {
        font-size: 13px;
        padding: 10px 12px;
        min-height: 44px;
    }
    
    .social-login-btn span {
        font-size: 13px;
    }
}

/* ========================
   인증 모달 스타일
   ======================== */

/* 모달 배경 */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* 모달 컨텐�?*/
.auth-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.auth-modal.show .auth-modal-content {
    transform: scale(1);
}

/* 모달 ?�더 */
.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 0 32px;
    border-bottom: none;
}

.auth-modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-modal-close:hover {
    background: var(--divider);
    color: var(--text-primary);
}

/* 모달 바디 */
.auth-modal-body {
    padding: 24px 32px 32px 32px;
}

/* ???��???*/
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ?�력 그룹 */
.input-group {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 16px 50px 16px 16px;
    border: 2px solid var(--divider);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--surface);
    outline: none;
    box-sizing: border-box;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(127, 90, 240, 0.1);
}

.input-group input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(238, 75, 106, 0.1);
}

.input-group input.success {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(86, 202, 140, 0.1);
}

/* 입력 아이콘 */
.input-icon {
    position: absolute;
    right: 16px;
    top: 65%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

/* 비밀번호 보기/숨기기 버튼 */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 65%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
    z-index: 2;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary);
}

/* 비�?번호 강도 ?�시 */
.password-strength {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: -8px;
}

.strength-bar {
    height: 4px;
    background: var(--divider);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: var(--error);
}

.strength-fill.fair {
    width: 50%;
    background: var(--warning);
}

.strength-fill.good {
    width: 75%;
    background: #56CA8C;
}

.strength-fill.strong {
    width: 100%;
    background: var(--success);
}

.strength-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ?�증 ?�션 */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* 체크박스 ?��???*/
.remember-me,
.terms-agree {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.remember-me input[type="checkbox"],
.terms-agree input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--divider);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remember-me input[type="checkbox"]:checked + .checkmark,
.terms-agree input[type="checkbox"]:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.remember-me input[type="checkbox"]:checked + .checkmark::after,
.terms-agree input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 링크 ?��???*/
.forgot-password,
.terms-link,
.privacy-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.forgot-password:hover,
.terms-link:hover,
.privacy-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ?�출 버튼 */
.auth-submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(127, 90, 240, 0.3);
}

.auth-submit-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 90, 240, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 12px rgba(127, 90, 240, 0.2);
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 구분??*/
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--divider);
}

.auth-divider span {
    padding: 0 16px;
}

/* ?�환 버튼 */
.auth-switch-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: center;
}

.auth-switch-btn:hover {
    background: var(--background);
    color: var(--primary);
}

.auth-switch-btn strong {
    color: var(--primary);
}

/* ?�메???�증 ?�더 */
.verify-header {
    text-align: center;
    margin-bottom: 32px;
}

.verify-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 24px rgba(127, 90, 240, 0.3);
}

.verify-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.verify-header p {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.verify-email-address {
    color: var(--primary) !important;
    font-weight: 600;
}

/* ?�증 ?�?�머 */
.verify-timer {
    text-align: center;
    margin: 16px 0;
    padding: 12px;
    background: rgba(127, 90, 240, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(127, 90, 240, 0.2);
}

.verify-timer #timer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.verify-timer #timer-count {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.verify-timer.expired {
    background: rgba(238, 75, 106, 0.1);
    border-color: rgba(238, 75, 106, 0.2);
}

.verify-timer.expired #timer-count {
    color: var(--error);
}

/* ?�전???�션 */
.resend-section {
    text-align: center;
    margin: 24px 0;
}

.resend-section p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.resend-btn {
    background: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.resend-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ?�스???�림 */
/* 토스트 알림 (스마트 위치 시스템) */
.success-toast,
.error-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    min-width: 300px;
    max-width: 500px;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.success-toast {
    background: rgba(86, 202, 140, 0.95);
    border: 1px solid rgba(86, 202, 140, 0.3);
}

.error-toast {
    background: rgba(238, 75, 106, 0.95);
    border: 1px solid rgba(238, 75, 106, 0.3);
}

.success-toast.show,
.error-toast.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* 위치별 특별 스타일 */
.success-toast[data-position="modal"],
.error-toast[data-position="modal"] {
    z-index: 10002; /* 모달보다 위에 */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.success-toast[data-position="form"],
.error-toast[data-position="form"] {
    z-index: 1000;
}

.success-toast[data-position="default"],
.error-toast[data-position="default"] {
    z-index: 10001;
}

/* 로그인 버튼 아래 위치 스타일 */
.success-toast[data-position="login-button"],
.error-toast[data-position="login-button"] {
    z-index: 10000;
    max-width: 400px; /* 적당한 최대 너비 */
}

.toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    color: white;
    font-weight: 500;
    gap: 12px;
}

.toast-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0; /* Flexbox 내에서 텍스트 오버플로우 처리를 위해 */
}

.toast-info i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* 모바일에서는 줄바꿈 허용 */
@media (max-width: 768px) {
    .toast-info span {
        white-space: normal;
        word-break: break-word;
    }
}

.toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.toast-close i {
    font-size: 0.9rem;
}

/* 로그??모달 반응???�자??*/
@media (max-width: 768px) {
    .header-bar {
        padding: 12px 16px;
        flex-direction: row; /* 가로 배치 유지 */
    }
    
    .header-logo h1 {
        font-size: 1.2rem; /* 모바일에서 폰트 크기 줄임 */
    }
    
    .login-button span,
    .logout-button span {
        display: none; /* 모바일에서 텍스트 숨기고 아이콘만 표시 */
    }
    
    .login-button,
    .logout-button {
        padding: 12px; /* 패딩 조정 */
        min-width: 44px; /* 터치 영역 확보 */
    }
    
    body {
        padding: 80px 16px 16px 16px;
    }
    
    .auth-modal-content {
        width: 95%;
        margin: 0 16px;
    }
    
    .auth-modal-header,
    .auth-modal-body {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .auth-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .success-toast,
    .error-toast {
        left: 50%;
        top: 80px;
        min-width: 280px;
        max-width: calc(100% - 32px);
        transform: translateX(-50%) translateY(-20px);
        white-space: normal; /* 모바일에서는 줄바꿈 허용 */
    }
    
    .success-toast.show,
    .error-toast.show {
        transform: translateX(-50%) translateY(0);
    }
    
    /* 모바일에서 모달 위치일 때 */
    .success-toast[data-position="modal"],
    .error-toast[data-position="modal"] {
        top: 60px; /* 모바일에서는 더 위쪽에 */
        max-width: calc(100% - 40px);
    }
    
    /* 모바일에서 로그인 버튼 아래 위치일 때 */
    .success-toast[data-position="login-button"],
    .error-toast[data-position="login-button"] {
        left: 50% !important; /* 중앙 정렬 */
        transform: translateX(-50%) translateY(-20px) !important;
        max-width: calc(100% - 32px);
        top: 70px; /* 헤더바 아래 적절한 위치 */
    }
}

@media (max-width: 480px) {
    .auth-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .verify-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* -------------------------------------------------------------------------------------------------------------------- */
/* .repeat-control .repeat-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 8px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid #ddd !important;
    border-radius: 16px !important;
    padding: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
    z-index: 99999 !important;
    min-width: 120px !important;
} */

/* 더 구체적인 선택자로 강제 적용 */
/* .player-controls .repeat-control .repeat-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
} */
/* -------------------------------------------------------------------------------------------------------------------- */

/* 푸터 스타일 */
.footer {
    background: var(--surface);
    border-top: 1px solid #e5e7eb;
    margin-top: 60px;
    padding: 40px 0 20px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.footer-section h4 {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid #e5e7eb;
    margin-top: 32px;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* 반응형 푸터 */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    
    .footer {
        margin-top: 40px;
        padding: 32px 0 16px 0;
    }
}

/* 2단계 회원가입 폼 스타일 */
.terms-header,
.signup-header {
    text-align: center;
    margin-bottom: 32px;
}

.terms-icon,
.signup-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 24px;
}

.terms-header h3,
.signup-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.terms-header p,
.signup-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.terms-content {
    margin: 24px 0;
}

.terms-item {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(127, 90, 240, 0.05);
    border: 1px solid rgba(127, 90, 240, 0.1);
    transition: all 0.3s ease;
}

.terms-item:hover {
    background: rgba(127, 90, 240, 0.08);
    border-color: rgba(127, 90, 240, 0.2);
}

.terms-divider {
    height: 1px;
    background: var(--divider);
    margin: 20px 0;
}

.terms-agree {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
}

.terms-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.terms-link,
.privacy-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.terms-link:hover,
.privacy-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.form-navigation {
    display: flex;
    gap: 16px;
    align-items: center;
}

.auth-back-btn {
    flex: 0 0 auto;
    background: var(--surface);
    border: 2px solid var(--divider);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(127, 90, 240, 0.05);
}

.auth-back-btn i {
    font-size: 0.8rem;
}

.form-navigation .auth-submit-btn {
    flex: 1;
}

/* 전체 동의 체크박스 스타일 강화 */
#terms-agree-all {
    transform: scale(1.1);
}

.terms-item:first-child {
    background: rgba(127, 90, 240, 0.1);
    border-color: rgba(127, 90, 240, 0.2);
    font-weight: 500;
}

.terms-item:first-child:hover {
    background: rgba(127, 90, 240, 0.15);
    border-color: rgba(127, 90, 240, 0.3);
}

/* 다음 버튼 아이콘 애니메이션 */
#terms-next-btn i {
    transition: transform 0.3s ease;
}

#terms-next-btn:hover i {
    transform: translateX(4px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .terms-icon,
    .signup-icon {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
    
    .terms-header h3,
    .signup-header h3 {
        font-size: 1.3rem;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .auth-back-btn {
        width: 100%;
        justify-content: center;
    }
    
    .terms-item {
        padding: 12px;
    }
    
    .terms-agree {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .terms-content {
        margin: 20px 0;
    }
    
    .terms-item {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .terms-checkbox {
        width: 16px;
        height: 16px;
        margin-right: 10px;
    }
}

/* ==========================================
   🎤 TTS 스마트 언어 감지 버튼 스타일
   ========================================== */

.tts-btn {
    background: linear-gradient(135deg, #4285f4, #34a853);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    padding: 6px 10px;
    margin: 0 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tts-btn:hover {
    background: linear-gradient(135deg, #3367d6, #2d8f47);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tts-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tts-btn i {
    font-size: 14px;
}

/* 🔊 TTS 재생 중 애니메이션 */
.tts-btn.playing {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    animation: tts-pulse 1s infinite alternate;
}

@keyframes tts-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* 📱 모바일 대응 */
@media (max-width: 768px) {
    .tts-btn {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 36px;
        height: 36px;
    }
    
    .tts-btn i {
        font-size: 16px;
    }
}

/* ==========================================
   🎯 브라우저별 점선 제거 및 포커스 스타일 개선
   ========================================== */

/* 모든 버튼의 브라우저 기본 포커스 스타일 제거 및 개선된 포커스 효과 적용 */
button:focus,
button:focus-visible {
    outline: none; /* 브라우저 기본 점선/테두리 제거 */
    box-shadow: 0 0 0 3px rgba(127, 90, 240, 0.4); /* 웹앱 테마 색상(보라색)에 맞는 부드러운 그림자 효과 */
}

/* 열 전환 버튼 전용 포커스 스타일 */
.swap-columns-btn:focus,
.swap-columns-btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(127, 90, 240, 0.5) !important; /* 조금 더 진한 보라색 그림자 */
    border-color: var(--primary) !important;
}

/* 크롬 브라우저 전용 점선 완전 제거 */
*:focus {
    outline: none;
}

/* 웹킷 기반 브라우저 (크롬, 사파리, 웨일) 전용 포커스 링 제거 */
*::-webkit-focus-ring {
    outline: none;
}

/* 파이어폭스 브라우저 전용 내부 포커스 테두리 제거 */
*::-moz-focus-inner {
    border: 0;
    outline: none;
}

/* 접근성을 위한 키보드 탐색 시에만 포커스 표시 */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
    box-shadow: none;
}

/* 숨기기 버튼 포커스 스타일 */
.hide-column-btn:focus,
.hide-column-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(127, 90, 240, 0.4);
    border-radius: 4px;
}

/* 사전 버튼들 포커스 스타일 */
.dict-button:focus,
.dict-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(127, 90, 240, 0.3);
}

/* 플레이어 버튼 포커스 스타일 */
.player-button:focus,
.player-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(127, 90, 240, 0.4);
}

/* 입력 필드 포커스 스타일 (기존 스타일 유지하면서 점선만 제거) */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* TTS 버튼 포커스 스타일 */
.tts-btn:focus,
.tts-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.4); /* TTS 버튼의 파란색 테마에 맞춘 그림자 */
}

/* ==========================================
   🤖 AI 학습 도우미 스타일
   ========================================== */


/* AI 학습 도우미 컨테이너 */
.ai-helper-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin: 20px 0;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    max-width: 100%;
    width: 100%;
}

/* AI 학습 도우미 헤더 */
.ai-helper-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.1), rgba(186, 85, 211, 0.1));
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.ai-helper-header:hover {
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.15), rgba(186, 85, 211, 0.15));
}

.ai-helper-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-helper-header h3 i {
    color: var(--primary);
    font-size: 1.2rem;
}

.ai-helper-toggle {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.ai-helper-toggle.rotated {
    transform: rotate(180deg);
}

/* AI 학습 도우미 콘텐츠 */
.ai-helper-content {
    padding: 20px;
    animation: slideDown 0.3s ease-out;
}

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

/* AI 도우미 안내 정보 */
.ai-helper-info {
    background: rgba(123, 97, 255, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.ai-helper-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-helper-info i {
    color: var(--primary);
}



/* AI 자동 요청 영역 */
.ai-auto-request {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.ai-request-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    box-shadow: 0 4px 12px rgba(123, 97, 255, 0.3);
    min-height: 60px;
}

.ai-request-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(123, 97, 255, 0.4);
}

.ai-request-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.5), 0 6px 20px rgba(123, 97, 255, 0.4);
}

.ai-request-btn:active {
    transform: translateY(-1px);
}

.ai-request-btn i {
    font-size: 1.3rem;
    color: white;
}

.ai-request-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 12px rgba(123, 97, 255, 0.2);
}

/* AI 응답 컨테이너 */
.ai-response-container {
    background: var(--surface);
    border: 1px solid var(--divider);
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
    width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AI 응답 헤더 */
.ai-response-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-response-header i {
    margin-right: 8px;
}

.ai-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
    outline: none;
}

.ai-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ai-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* AI 응답 콘텐츠 */
.ai-response-content {
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.ai-response-content h4 {
    color: var(--primary);
    margin: 0 0 12px 0;
    font-size: 1.1rem;
}

.ai-response-content p {
    margin: 0 0 12px 0;
}

.ai-response-content .mnemonic-technique {
    background: rgba(123, 97, 255, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin: 8px 0 4px 0;
}



/* 핵심 연상기법 한 줄 강조 스타일 */
.ai-response-content .core-mnemonic {
    margin: 16px 0 0 0;
    padding: 0;
}

.ai-response-content .core-mnemonic strong {
    display: block;
    font-weight: 700;
    font-size: 1.05em;
    color: var(--text-primary);
    text-align: left;
    margin-bottom: 8px;
}

.ai-response-content .example-sentence {
    background: rgba(46, 125, 50, 0.1);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #2E7D32;
    margin: 12px 0;
    font-style: italic;
}

/* AI 응답 액션 버튼들 */
.ai-response-actions {
    padding: 16px;
    border-top: 1px solid var(--divider);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.ai-action-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.ai-action-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.ai-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 97, 255, 0.3);
}

.ai-action-btn.secondary {
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--divider);
}

.ai-action-btn.secondary:hover {
    background: var(--surface-secondary);
    border-color: var(--primary);
}

.ai-action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.3);
}

/* AI 상태 (로딩) */
.ai-status {
    padding: 20px;
    text-align: center;
}

.ai-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ai-loading i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* 다크모드 대응 */
html.dark-mode .ai-helper-container {
    background: rgba(31, 41, 55, 0.7);
    border-color: rgba(75, 85, 99, 0.3);
}

html.dark-mode .ai-helper-header {
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.15), rgba(186, 85, 211, 0.15));
}

html.dark-mode .ai-helper-info {
    background: rgba(123, 97, 255, 0.15);
}



html.dark-mode .ai-option-btn {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.5);
}

html.dark-mode .ai-option-btn:hover {
    background: rgba(123, 97, 255, 0.1);
}

html.dark-mode .ai-response-container {
    background: rgba(31, 41, 55, 0.9);
    border-color: rgba(75, 85, 99, 0.5);
}

html.dark-mode .ai-response-content .mnemonic-technique {
    background: rgba(123, 97, 255, 0.15);
}



/* 다크모드에서 핵심 연상기법 가독성 유지 */
html.dark-mode .ai-response-content .core-mnemonic strong {
    color: var(--text-primary);
}

html.dark-mode .ai-response-content .example-sentence {
    background: rgba(46, 125, 50, 0.15);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .ai-helper-content {
        padding: 16px;
    }
    
    .ai-request-btn {
        padding: 14px 24px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 300px;
    }
    
    .ai-response-actions {
        flex-direction: column;
    }
    
    .ai-action-btn {
        width: 100%;
        justify-content: center;
    }
}