/* 전체 레이아웃 */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    color: #2f3542;
    line-height: 1.6;
    padding-top: 70px; /* 네비게이션 바 높이만큼 여백 추가 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.converter-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 20px;
}

/* 입력 섹션 */
.input-section, .output-section {
    padding: 20px;
    background: #fff;
    border-radius: 12px;
}

h2 {
    color: #2f3542;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 600;
}

h2 i {
    color: #5352ed;
    font-size: 1.3em;
}

/* 탭 스타일 */
.input-method-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    padding: 5px;
    background: #f1f2f6;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    color: #2f3542;
}

.tab-btn:hover {
    background: rgba(83, 82, 237, 0.1);
}

.tab-btn.active {
    background: #5352ed;
    color: white;
    font-weight: 500;
}

.tab-btn i {
    font-size: 1.1em;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* 입력 필드 */
.input-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #2f3542;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

label i {
    color: #5352ed;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #dfe4ea;
    border-radius: 12px;
    resize: vertical;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    min-height: 200px;
    transition: all 0.3s ease;
}

textarea:focus {
    border-color: #5352ed;
    outline: none;
    box-shadow: 0 0 0 3px rgba(83, 82, 237, 0.1);
}

.input-info {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    color: #747d8c;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.input-info .char-count,
.input-info .line-count {
    white-space: nowrap;
}

.shortcut-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #5352ed;
    background: rgba(83, 82, 237, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.shortcut-info i {
    font-size: 0.9em;
}

/* 파일 업로드 영역 */
.file-upload-area {
    border: 2px dashed #dfe4ea;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.file-upload-area:hover, .file-upload-area.dragover {
    border-color: #5352ed;
    background: rgba(83, 82, 237, 0.05);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-content i {
    font-size: 48px;
    color: #5352ed;
}

.upload-content h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #2f3542;
}

.upload-content p {
    margin: 0;
    color: #747d8c;
}

.upload-btn {
    background: #5352ed;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.upload-btn:hover {
    background: #4040e2;
    transform: translateY(-2px);
}

/* 파일 정보 */
.file-info {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dfe4ea;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-details i {
    color: #5352ed;
    font-size: 1.2em;
}

.file-name {
    font-weight: 500;
    color: #2f3542;
}

.file-size {
    color: #747d8c;
    font-size: 0.9em;
}

.remove-file-btn {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.remove-file-btn:hover {
    background: rgba(255, 71, 87, 0.1);
}

/* 옵션 섹션 */
.options-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #dfe4ea;
}

.options-section h3 {
    margin: 0 0 15px 0;
    color: #2f3542;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.options-section h3 i {
    color: #5352ed;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* 변환 타입 섹션 */
.conversion-type-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #dfe4ea;
}

.conversion-type-section h3 {
    margin: 0 0 15px 0;
    color: #2f3542;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.conversion-type-section h3 i {
    color: #5352ed;
}

.conversion-type-tabs {
    display: flex;
    gap: 12px;
    padding: 5px;
    background: #f1f2f6;
    border-radius: 12px;
}

.conversion-tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #2f3542;
    text-align: center;
    white-space: nowrap;
    min-height: 44px;
}

.conversion-tab-btn:hover {
    background: rgba(83, 82, 237, 0.1);
}

.conversion-tab-btn.active {
    background: #5352ed;
    color: white;
    font-weight: 500;
}

.conversion-tab-btn i {
    font-size: 1em;
    flex-shrink: 0;
}

/* 직접 입력 필드 */
.custom-function-input {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dfe4ea;
    animation: fadeIn 0.3s ease;
}

.custom-function-input label {
    display: block;
    margin-bottom: 8px;
    color: #2f3542;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.custom-function-input label i {
    color: #5352ed;
}

.custom-function-field {
    width: 100%;
    padding: 12px;
    border: 2px solid #dfe4ea;
    border-radius: 8px;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.custom-function-field:focus {
    border-color: #5352ed;
    outline: none;
    box-shadow: 0 0 0 3px rgba(83, 82, 237, 0.1);
}

.custom-function-info {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #747d8c;
    background: rgba(83, 82, 237, 0.05);
    padding: 6px 10px;
    border-radius: 6px;
}

.custom-function-info i {
    color: #5352ed;
    font-size: 0.9em;
}

/* 체크박스 스타일 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: rgba(83, 82, 237, 0.05);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #5352ed;
    border-radius: 4px;
    cursor: pointer;
}

/* 변환 버튼 */
.convert-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.convert-btn i {
    font-size: 1.2em;
}

/* 출력 섹션 */
.result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.item-count {
    color: #747d8c;
    font-size: 0.95rem;
}

.result-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.copy-btn, .clear-btn, .list-items-btn, .remove-quotes-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.copy-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-1px);
}

.list-items-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.list-items-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-1px);
}

.remove-quotes-btn {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.remove-quotes-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    transform: translateY(-1px);
}

.clear-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.clear-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
}

.copy-btn:disabled, .list-items-btn:disabled, .remove-quotes-btn:disabled {
    background: #6c757d;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
}

.output-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    min-height: 300px;
    border: 1px solid #dfe4ea;
}

.output-data {
    font-family: 'Consolas', monospace;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    color: #2f3542;
    font-size: 14px;
    line-height: 1.6;
}

/* 토스트 메시지 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-success {
    background: #2ed573;
}

.toast-error {
    background: #ff4757;
}

.toast-info {
    background: #5352ed;
}

/* 애니메이션 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .converter-section {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .input-method-tabs {
        flex-direction: column;
    }
    
    .conversion-type-tabs {
        flex-direction: column;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .result-info {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .result-actions {
        justify-content: stretch;
    }
    
    .copy-btn, .clear-btn, .list-items-btn, .remove-quotes-btn {
        flex: 1;
        justify-content: center;
    }
    
    .input-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .shortcut-info {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
    
    .custom-function-input {
        margin-top: 10px;
        padding: 12px;
    }
    
    .custom-function-field {
        font-size: 16px; /* 모바일에서 자동 확대 방지 */
    }
} 