/* 기본 설정 */
:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #6366F1;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.2s ease;
    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 헤더 */
.header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary-color);
}

/* 메인 섹션 */
.main {
    padding: 60px 0;
    min-height: calc(100vh - 80px);
}

.hero {
    text-align: center;
    margin-bottom: 60px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--gray-900);
}

.hero .highlight {
    color: var(--primary-color);
    position: relative;
}

.subtitle {
    font-size: 20px;
    color: var(--gray-600);
    font-weight: 400;
    margin-bottom: 20px;
}

/* 호환성 배지 */
.compatibility-badge {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    box-shadow: var(--shadow-sm);
}

.badge.chrome {
    background: linear-gradient(135deg, #4285F4, #34A853);
}

.badge.firefox {
    background: linear-gradient(135deg, #FF9500, #FF6611);
}

.badge.acrobat {
    background: linear-gradient(135deg, #DC143C, #B22222);
}

/* 업로드 섹션 */
.upload-section {
    margin-bottom: 60px;
}

.upload-box {
    background: white;
    border: 2px dashed var(--gray-300);
    border-radius: 16px;
    padding: 60px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.upload-box:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.upload-box.drag-over {
    border-color: var(--primary-color);
    background-color: var(--gray-50);
}

.upload-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--gray-900);
}

.upload-content p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* 버튼 스타일 */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    user-select: none;
    outline: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-50);
    border-color: var(--gray-400);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 작업 영역 */
.workspace {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

/* 단계 표시 */
.steps {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--gray-200);
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-400);
    font-weight: 500;
    position: relative;
}

.step.active {
    color: var(--primary-color);
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

/* 페이지 선택기 */
.page-selector {
    margin-bottom: 40px;
}

.pdf-info {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.pdf-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.info-text {
    color: var(--gray-600);
    font-size: 14px;
    margin-top: 8px;
}

.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.page-thumbnail {
    border: 3px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    position: relative;
}

.page-thumbnail:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.page-thumbnail.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-lg);
}

.page-thumbnail canvas,
.page-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 8px;
}

.page-number {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

/* GIF 위치 편집기 */
.gif-position-editor {
    display: none;
    margin-bottom: 24px;
}

.editor-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.pdf-preview-container {
    flex: 1;
    position: relative;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    background: white;
    max-width: 100%;
    max-height: 600px;
    box-shadow: var(--shadow-md);
}

.pdf-preview-canvas {
    width: 100%;
    height: auto;
    display: block;
}

.gif-overlay {
    position: absolute;
    border: 2px solid var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
    cursor: move;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 10px;
    min-height: 10px;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
    border-radius: 4px;
}

.gif-overlay img, .gif-overlay video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 2px;
}

.resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.resize-handle.nw { top: -5px; left: -5px; cursor: nw-resize; }
.resize-handle.ne { top: -5px; right: -5px; cursor: ne-resize; }
.resize-handle.sw { bottom: -5px; left: -5px; cursor: sw-resize; }
.resize-handle.se { bottom: -5px; right: -5px; cursor: se-resize; }

.controls-panel {
    width: 320px;
    background: var(--gray-50);
    border-radius: 12px;
    padding: 24px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.control-row {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}

.control-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    box-sizing: border-box;
    font-family: var(--font-family);
}

.control-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.range-input {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    background: var(--gray-300);
    border-radius: 3px;
    outline: none;
    margin: 0 8px;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.range-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

/* 애니메이션 모드 선택 */
.animation-mode {
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 8px;
    padding: 4px 0;
    transition: var(--transition);
}

.radio-label:hover, .checkbox-label:hover {
    color: var(--primary-color);
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    margin: 0;
    accent-color: var(--primary-color);
}

.radio-label span {
    font-size: 14px;
}

.gif-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.gif-upload-area:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
    box-shadow: var(--shadow-sm);
}

.gif-upload-area.has-gif {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.gif-preview {
    max-width: 100px;
    max-height: 100px;
    margin: 0 auto 8px;
    display: block;
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

/* 처리 중 오버레이 */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.processing-content {
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 40px;
    border-radius: 16px;
    max-width: 400px;
    box-shadow: var(--shadow-xl);
}

.processing-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.processing-content p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.spinner {
    width: 64px;
    height: 64px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 0.8s linear infinite;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin: 20px 0 10px;
}

.progress-fill {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* 완료 화면 */
.completion-screen {
    text-align: center;
    padding: 60px 0;
    animation: fadeIn 0.5s ease;
}

.completion-content {
    max-width: 480px;
    margin: 0 auto;
}

.completion-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.completion-content p {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 32px;
}

.success-icon {
    margin-bottom: 24px;
}

.completion-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 기능 그리드 */
.how-it-works {
    padding: 80px 0;
    background: white;
    margin-top: 80px;
}

.how-it-works h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--gray-900);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature-card {
    text-align: center;
    padding: 32px;
    border-radius: 12px;
    background: var(--gray-50);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.5;
}

/* 호환성 정보 섹션 */
.compatibility-info {
    padding: 80px 0;
    background: var(--gray-50);
    margin-top: 80px;
}

.compatibility-info h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--gray-900);
}

.compatibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.compatibility-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.compatibility-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.compatibility-card.chrome-card {
    border-left-color: #4285F4;
}

.compatibility-card.firefox-card {
    border-left-color: #FF9500;
}

.compatibility-card.acrobat-card {
    border-left-color: #DC143C;
}

.compatibility-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.compatibility-card p {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.support-level {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.support-level.full {
    background: var(--success-color);
    color: white;
}

.support-level.partial {
    background: var(--warning-color);
    color: white;
}

.support-level.none {
    background: var(--gray-400);
    color: white;
}

/* 애니메이션 */
@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .compatibility-badge {
        flex-direction: column;
        align-items: center;
    }
    
    .steps {
        gap: 24px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .step span {
        display: none;
    }
    
    .workspace {
        padding: 24px;
    }
    
    .editor-container {
        flex-direction: column;
    }
    
    .controls-panel {
        width: 100%;
        max-width: 100%;
        margin-top: 20px;
    }
    
    .control-row {
        width: 100%;
    }
    
    .control-input {
        min-width: 0;
        font-size: 16px; /* iOS zoom 방지 */
    }
    
    .gif-upload-area {
        padding: 15px;
    }
    
    .pdf-preview-container {
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .completion-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .completion-actions button {
        width: 100%;
        max-width: 300px;
    }
    
    .nav {
        gap: 16px;
    }
    
    .nav a {
        font-size: 14px;
    }
    
    .upload-box {
        padding: 40px 20px;
    }
    
    .pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .controls-panel {
        padding: 16px;
    }
    
    .control-group {
        margin-bottom: 16px;
    }
    
    .control-input {
        padding: 10px 12px;
        font-size: 16px; /* iOS zoom 방지 */
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons button {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .upload-box {
        padding: 30px 15px;
    }
    
    .hero h1 {
        font-size: 28px;
        line-height: 1.3;
    }
    
    .subtitle {
        font-size: 16px;
        padding: 0 10px;
    }
    
    .processing-content {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .compatibility-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .how-it-works h2,
    .compatibility-info h2 {
        font-size: 28px;
    }
    
    .badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .steps {
        gap: 16px;
    }
    
    .pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .page-thumbnail {
        padding: 12px;
    }
}

/* 특별한 상황들 */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 24px;
    }
    
    .controls-panel {
        padding: 12px;
    }
    
    .control-input {
        padding: 8px 10px;
    }
    
    .upload-box {
        padding: 20px 10px;
    }
}

/* 고해상도 디스플레이 최적화 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .pdf-preview-canvas,
    .page-thumbnail img,
    .page-thumbnail canvas {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #1F2937;
        --gray-100: #374151;
        --gray-200: #4B5563;
        --gray-300: #6B7280;
        --gray-400: #9CA3AF;
        --gray-500: #D1D5DB;
        --gray-600: #E5E7EB;
        --gray-700: #F3F4F6;
        --gray-800: #F9FAFB;
        --gray-900: #FFFFFF;
    }
    
    body {
        background-color: #111827;
        color: #F9FAFB;
    }
    
    .header {
        background: #1F2937;
        border-bottom-color: #374151;
    }
    
    .upload-box,
    .workspace,
    .compatibility-card,
    .feature-card {
        background: #1F2937;
        border-color: #374151;
    }
    
    .controls-panel,
    .pdf-info {
        background: #374151;
    }
    
    .control-input,
    .gif-upload-area {
        background: #1F2937;
        border-color: #4B5563;
        color: #F9FAFB;
    }
    
    .control-input:focus {
        border-color: var(--primary-color);
        background: #374151;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .spinner {
        animation: none;
        border: 4px solid rgba(255, 255, 255, 0.3);
        border-top-color: white;
    }
    
    .page-thumbnail:hover,
    .feature-card:hover,
    .compatibility-card:hover {
        transform: none;
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid var(--gray-900);
    }
    
    .btn-secondary {
        border: 2px solid var(--gray-900);
    }
    
    .upload-box {
        border-width: 3px;
    }
    
    .page-thumbnail {
        border-width: 3px;
    }
    
    .control-input:focus {
        box-shadow: 0 0 0 3px var(--primary-color);
    }
}

/* 인쇄 스타일 */
@media print {
    .header,
    .nav,
    .processing-overlay,
    .completion-screen {
        display: none !important;
    }
    
    .workspace {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 1px solid #000;
        color: #000 !important;
        background: white !important;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .btn-primary,
    .btn-secondary,
    .page-thumbnail,
    .upload-box {
        min-height: 44px; /* 터치 최소 크기 */
    }
    
    .resize-handle {
        width: 20px;
        height: 20px;
    }
    
    .control-input {
        min-height: 44px;
    }
}

/* 포커스 가시성 개선 */
.btn-primary:focus,
.btn-secondary:focus,
.control-input:focus,
.page-thumbnail:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 스크린 리더 전용 클래스 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 로딩 상태 */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 에러 상태 */
.error {
    border-color: var(--danger-color) !important;
    background-color: rgba(239, 68, 68, 0.05);
}

.error-message {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 성공 상태 */
.success {
    border-color: var(--success-color) !important;
    background-color: rgba(16, 185, 129, 0.05);
}

/* 유틸리티 클래스 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.hidden { display: none; }
.visible { display: block; }

/* 개발자 도구 */
.debug-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    z-index: 9999;
    max-width: 300px;
}

/* 개선된 스크롤바 (Webkit 브라우저) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* 선택 영역 스타일 */
::selection {
    background: var(--primary-color);
    color: white;
}
