:root {
    --bg-color: #0c0c0c;
    --card-bg: #1a1a1a;
    --text-color: #e0e0e0;
    --accent-color: #007aff;
    --success-color: #34c759;
    --error-color: #ff3b30;
    --border-color: #333333;
    --header-height: 60px;
    --nav-height: 75px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: #030305;
    background-image: 
        radial-gradient(at 5% 5%, rgba(0, 122, 255, 0.28) 0px, transparent 65%),
        radial-gradient(at 95% 10%, rgba(155, 89, 182, 0.24) 0px, transparent 55%),
        radial-gradient(at 50% 95%, rgba(0, 242, 254, 0.18) 0px, transparent 60%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: transparent !important;
}

/* Header */
header {
    height: var(--header-height);
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(10, 10, 12, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.logo {
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-ai {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.status-indicator {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 12px;
    background: rgba(52, 199, 89, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(52, 199, 89, 0.3);
}

/* Screens */
main {
    flex: 1;
    padding: 20px;
    padding-bottom: calc(var(--nav-height) + 20px);
    background: transparent !important;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Welcome Screen */
.hero {
    margin-top: 40px;
    margin-bottom: 60px;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero .highlight {
    color: var(--accent-color);
}

.hero p {
    color: #888;
    font-size: 0.95rem;
}

.empty-msg {
    text-align: center;
    color: #555;
    margin-top: 40px;
}

/* Result Screen */
.image-preview-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
}

#scanned-image {
    width: 100%;
    display: block;
    max-height: 200px;
    object-fit: cover;
}

.btn-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 15px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Result Cards Glassmorphism - Ultra Premium */
.result-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    padding: 22px !important;
    margin-bottom: 22px !important;
    backdrop-filter: blur(25px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
    box-shadow: 0 10px 35px 0 rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.result-card:hover {
    border-color: rgba(0, 122, 255, 0.45) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 122, 255, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
}

.result-card:active {
    transform: scale(0.98);
}

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

.card-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge {
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(52, 199, 89, 0.15) !important;
    color: #34c759 !important;
    border: 1px solid rgba(52, 199, 89, 0.3) !important;
    text-shadow: 0 0 5px rgba(52, 199, 89, 0.4);
}
.badge-error {
    background: rgba(255, 59, 48, 0.15) !important;
    color: #ff3b30 !important;
    border: 1px solid rgba(255, 59, 48, 0.3) !important;
    text-shadow: 0 0 5px rgba(255, 59, 48, 0.4);
}
.badge-warning {
    background: rgba(255, 149, 0, 0.15) !important;
    color: #ff9500 !important;
    border: 1px solid rgba(255, 149, 0, 0.3) !important;
    text-shadow: 0 0 5px rgba(255, 149, 0, 0.4);
}

.card-body {
    font-size: 1rem;
    overflow-x: auto;
}

/* Navigation Glassmorphism - Minimalist 3-Tab */
.bottom-nav {
    height: var(--nav-height);
    background: rgba(10, 10, 12, 0.5) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 100;
}

.nav-item {
    background: none;
    border: none;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    cursor: pointer;
    width: 60px;
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-item.active {
    color: var(--accent-color) !important;
    text-shadow: 0 0 8px rgba(0, 122, 255, 0.4);
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    transition: all 0.3s;
}

.nav-item.active .nav-icon {
    transform: translateY(-2px);
    stroke-width: 2px;
}

/* Custom Select Glassmorphism */
.custom-select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    outline: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    appearance: none;
    -webkit-appearance: none;
}

.custom-select:focus {
    border-color: var(--accent-color) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.custom-select option {
    background: #151518;
    color: #fff;
}

.custom-select option:disabled {
    color: #555 !important;
    background: #0d0d0f;
}

.fab .icon { font-size: 1.8rem; }

/* Modal Glassmorphism */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    backdrop-filter: blur(10px);
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 85vh;
    background: rgba(15, 15, 18, 0.75) !important;
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 20px 20px 0 0;
    padding: 30px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* 모바일 부드러운 스크롤 */
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5) !important;
}

.btn-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
}

/* Spinner */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 300;
    backdrop-filter: blur(15px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.05);
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.2);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Settings Panel Glassmorphism */
.settings-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -100%;
    width: 100%;
    height: auto;
    background: rgba(15, 15, 18, 0.75) !important;
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    z-index: 99999; /* 내비게이션 바 및 모든 요소 위에 완전히 덮어씌움 */
    transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* 모바일 부드러운 스크롤 */
}

.settings-panel.active { right: 0; }

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

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #888;
}

.setting-group input {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    outline: none;
}

.btn-save {
    width: 100%;
    padding: 15px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
}

/* Markdown & Content Formatting */
.math-content {
    white-space: pre-wrap;
    word-break: break-word;
}

.math-render {
    word-break: break-word;
    font-size: 0.95rem;
}

.math-render p {
    margin-bottom: 12px;
}


.detail-section {
    margin-bottom: 25px;
}

.detail-section h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
}

.detail-section b {
    color: #fff;
    font-weight: 700;
}

/* History Item Glassmorphism */
.history-item {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 16px !important;
    margin-bottom: 12px !important;
    cursor: pointer !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(0, 122, 255, 0.35) !important;
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-1px);
}

.history-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.08) !important;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-date {
    font-size: 0.75rem;
    color: #777;
}

.history-preview {
    font-size: 0.9rem;
    color: #ccc;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    word-break: break-all;
}

/* Upload Workflow Layout */
.upload-workflow {
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Glassmorphism Slot Card - Ultra Premium 24px */
.upload-slot-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 24px !important;
    padding: 24px !important;
    backdrop-filter: blur(25px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.upload-slot-card:hover {
    border-color: rgba(0, 122, 255, 0.45) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 122, 255, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
}

.slot-title {
    font-size: 1.05rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85) !important;
    margin-bottom: 20px;
    text-align: left;
    letter-spacing: 0.3px;
}

.slot-placeholder {
    margin-top: 5px;
}

/* Linear SVG Double Dropzone */
.click-zones {
    display: flex;
    justify-content: center;
    gap: 40px;
    align-items: center;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 35px 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.click-zones:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.click-zone {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.72) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.click-zone:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.08);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.click-zone:active {
    transform: scale(0.95);
}

.zone-svg {
    width: 32px;
    height: 32px;
}

/* Slot Preview and Thumbnails */
.slot-preview {
    position: relative;
    margin-top: 8px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.slot-img-preview {
    width: 100%;
    display: block;
    max-height: 140px;
    object-fit: contain;
    background: #09090b;
    border-radius: 14px;
}

.btn-remove-file {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 13px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-remove-file:active {
    transform: scale(0.9);
    background: #ff3b30;
}

/* Start Button Neon Aqua Crystal Capsule Upgrade */
.btn-start-analysis {
    width: 100%;
    margin-top: 20px;
    padding: 18px;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    font-size: 1.05rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    cursor: not-allowed;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.btn-start-analysis::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
    border-radius: 24px 24px 0 0;
    pointer-events: none;
}

.btn-start-analysis.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.45), rgba(0, 122, 255, 0.45)) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 0 35px rgba(0, 242, 254, 0.65), 0 8px 25px rgba(0, 122, 255, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

.btn-start-analysis.active:active {
    transform: scale(0.97);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4) !important;
}

.btn-search-svg {
    width: 20px;
    height: 20px;
}

/* Premium Depth Selector (Horizontal Segmented Control) */
.depth-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 14px !important;
    padding: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    gap: 4px;
    margin-top: 5px;
}

.depth-btn {
    flex: 1;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.5) !important;
    padding: 11px 8px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    outline: none;
}

.depth-btn:hover:not(.disabled):not(.active) {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.depth-btn.active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--accent-color) !important;
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.2) !important;
    border: 1px solid rgba(0, 122, 255, 0.25) !important;
}

.depth-btn:disabled, .depth-btn.disabled {
    color: rgba(255, 255, 255, 0.38) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.38) !important;
    cursor: not-allowed !important;
    background: rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    opacity: 0.8 !important;
}

/* Review Mode Switcher Styles (Restored and optimized) */
.mode-selector-container {
    padding: 5px 0 10px 0;
}

.mode-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}

.mode-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: #888888 !important;
    padding: 11px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    outline: none;
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--accent-color) !important;
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.3) !important;
    border: 1px solid rgba(0, 122, 255, 0.25) !important;
    text-shadow: 0 0 5px rgba(0, 122, 255, 0.3);
}



/* Advanced 2-Step History Item Layout */
.history-title {
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    color: #ffffff !important;
    font-size: 0.95rem;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    word-break: break-all;
}

.history-preview {
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.55) !important;
    line-height: 1.45;
    word-break: break-all;
}

/* Premium Settings Round Close Button */
.btn-close-settings {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    padding: 0 !important;
}

.btn-close-settings:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.08);
}

.btn-close-settings:active {
    transform: scale(0.92);
}

.close-svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: all 0.3s;
}

/* Premium Glassmorphism Auth Overlay Styles */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 3, 5, 0.45) !important;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    animation: fadeIn 0.4s ease-out;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 28px !important;
    padding: 35px 28px !important;
    backdrop-filter: blur(30px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: scaleUp 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.8px;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
    margin-bottom: 8px;
}

#auth-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.2px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.3px;
}

.auth-input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    color: white !important;
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-input-group input:focus {
    border-color: var(--accent-color) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 12px rgba(0, 122, 255, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-auth {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.45), rgba(0, 122, 255, 0.45)) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 16px !important;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 242, 254, 0.4), 0 5px 15px rgba(0, 122, 255, 0.2) !important;
}

.btn-auth:active {
    transform: scale(0.97);
}

.auth-switch {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 10px;
}

.auth-switch a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.auth-switch a:hover {
    text-shadow: 0 0 8px rgba(0, 122, 255, 0.5);
    text-decoration: underline;
}

/* ==================== Feedback System UI Styles ==================== */
.feedback-btn {
    flex: 1;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Default States: Glassmorphic dark outline */
.btn-correct {
    background: rgba(46, 204, 113, 0.05);
    border: 1.5px solid rgba(46, 204, 113, 0.25);
    color: #2ecc71;
}
.btn-correct:hover, .btn-correct.active {
    background: rgba(46, 204, 113, 0.2) !important;
    border-color: #2ecc71 !important;
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.4);
}

.btn-wrong-flag {
    background: rgba(155, 89, 182, 0.05);
    border: 1.5px solid rgba(155, 89, 182, 0.25);
    color: #9b59b6;
}
.btn-wrong-flag:hover, .btn-wrong-flag.active {
    background: rgba(155, 89, 182, 0.2) !important;
    border-color: #9b59b6 !important;
    box-shadow: 0 0 12px rgba(155, 89, 182, 0.4);
}

.btn-missed-error {
    background: rgba(230, 126, 34, 0.05);
    border: 1.5px solid rgba(230, 126, 34, 0.25);
    color: #e67e22;
}
.btn-missed-error:hover, .btn-missed-error.active {
    background: rgba(230, 126, 34, 0.2) !important;
    border-color: #e67e22 !important;
    box-shadow: 0 0 12px rgba(230, 126, 34, 0.4);
}

.btn-submit-feedback {
    width: 100%;
    padding: 12px;
    background: var(--accent-color) !important;
    border: none;
    border-radius: 8px;
    color: #111 !important;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.15);
}
.btn-submit-feedback:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.3);
    transform: translateY(-1px);
}

/* ==================== Admin Dashboard UI Styles ==================== */
.admin-tab-btn {
    transition: all 0.25s ease;
}
.admin-tab-btn.active {
    background: rgba(0, 122, 255, 0.15) !important;
    border-color: rgba(0, 122, 255, 0.4) !important;
    color: #007aff !important;
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.2);
}

.admin-user-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
}
.admin-user-card .avatar {
    width: 38px;
    height: 38px;
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007aff;
    font-size: 1.1rem;
}
.admin-user-card .info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.admin-user-card .email {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}
.admin-user-card .date {
    font-size: 0.75rem;
    color: #888;
}

.admin-feedback-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.3s;
}

/* Card border coloring based on feedback type */
.admin-feedback-card.fb-correct {
    border: 1px solid rgba(46, 204, 113, 0.15);
    border-left: 5px solid #2ecc71;
}
.admin-feedback-card.fb-wrong_flag {
    border: 1px solid rgba(155, 89, 182, 0.15);
    border-left: 5px solid #9b59b6;
}
.admin-feedback-card.fb-missed_error {
    border: 1px solid rgba(230, 126, 34, 0.15);
    border-left: 5px solid #e67e22;
}

.admin-feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-feedback-user {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ddd;
}
.admin-feedback-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 800;
}
.badge-fb-correct {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}
.badge-fb-wrong_flag {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
}
.badge-fb-missed_error {
    background: rgba(230, 126, 34, 0.15);
    color: #e67e22;
}

.admin-feedback-meta {
    font-size: 0.75rem;
    color: #777;
    display: flex;
    justify-content: space-between;
}

.admin-feedback-comment {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid rgba(255, 255, 255, 0.15);
    padding: 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #ccc;
    font-style: italic;
}

.btn-toggle-problem-text {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-align: left;
    outline: none;
}
.btn-toggle-problem-text:hover {
    text-decoration: underline;
}

.admin-problem-raw-text {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.8rem;
    color: #bbb;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
    font-family: 'Consolas', monospace;
}




