.qr-reader-container {
    max-width: calc(1200px - 2rem);
    margin: 2rem auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background-color: white;
    z-index: 1;
}

.input-section {
    width: 100%;
    z-index: 2;
}

.scan-mode-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.mode-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mode-tab:hover {
    color: var(--primary-color, #0078d4);
}

.mode-tab.active {
    color: var(--primary-color, #0078d4);
    border-bottom-color: var(--primary-color, #0078d4);
}

.mode-tab i {
    font-size: 1rem;
}

.scan-mode {
    width: 100%;
}

.scan-mode.hidden {
    display: none;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
}

.camera-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scan-frame {
    width: 70%;
    max-width: 300px;
    aspect-ratio: 1;
    border: 3px solid #0078d4;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    position: relative;
}

.scan-frame::before,
.scan-frame::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 4px solid #0078d4;
}

.scan-frame::before {
    top: -4px;
    left: -4px;
    border-right: none;
    border-bottom: none;
}

.scan-frame::after {
    bottom: -4px;
    right: -4px;
    border-left: none;
    border-top: none;
}

.scan-instruction {
    margin-top: 1rem;
    color: white;
    font-size: 0.9rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding: 0 1rem;
}

.camera-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-area:hover {
    border-color: #0078d4;
    background: #f0f7ff;
}

.upload-area i {
    font-size: 3rem;
    color: #666;
}

.upload-area p {
    margin: 0;
    color: #555;
    font-size: 1rem;
}

.upload-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color, #0078d4);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.upload-btn:hover {
    background: #005a9e;
}

.upload-hint {
    margin: 0;
    color: #999;
    font-size: 0.85rem;
}

.uploaded-image-preview {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.uploaded-image-preview.hidden {
    display: none;
}

.uploaded-image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.btn-remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.5rem;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-remove-image:hover {
    background-color: #c82333;
}

.result-section {
    width: 100%;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.result-container {
    min-height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.placeholder-text {
    color: #999;
    font-style: italic;
    font-size: 0.95rem;
    text-align: center;
}

.result-success {
    text-align: center;
    color: #28a745;
}

.result-success i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.result-success p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.result-details {
    margin-top: 1.5rem;
}

.result-details.hidden {
    display: none;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.type-label {
    font-weight: 600;
    color: #555;
}

.type-value {
    color: #0078d4;
    font-weight: 500;
}

.result-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-text label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.result-text textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    box-sizing: border-box;
}

.result-text textarea:focus {
    outline: none;
    border-color: var(--primary-color, #0078d4);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.result-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.result-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 4;
}

.result-actions .btn-primary {
    background: var(--primary-color, #0078d4);
    color: white;
}

.result-actions .btn-primary:hover {
    background: #005a9e;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 120, 212, 0.3);
}

.result-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.result-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.result-actions .btn i {
    font-size: 1.1rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    position: relative;
    z-index: 3;
}

.btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 4;
}

.btn-primary {
    background: var(--primary-color, #0078d4);
    color: white;
}

.btn-primary:hover {
    background: #005a9e;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 120, 212, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn.hidden {
    display: none;
}

.btn i {
    font-size: 1.1rem;
}

/* 성공/에러 메시지 스타일 */
.message {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    z-index: 9999;
    max-width: 300px;
}

.message.success {
    background: #28a745;
}

.message.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 반응형 디자인 */
@media (max-width: 968px) {
    .qr-reader-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .result-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .qr-reader-container {
        padding: 1rem;
    }

    .camera-container {
        aspect-ratio: 4 / 3;
    }

    .scan-mode-selector {
        flex-direction: column;
    }

    .mode-tab {
        width: 100%;
        justify-content: center;
    }

    .camera-controls,
    .result-actions {
        flex-direction: column;
    }

    .upload-area {
        padding: 2rem 1rem;
    }
}

