/* 전체 스타일 리셋 및 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* 헤더 스타일 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header h1 i {
    margin-right: 15px;
    color: #ffd700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 메인 콘텐츠 */
.main-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* QR 생성기 섹션 */
.qr-generator {
    padding: 40px;
}

.input-section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 1rem;
}

.input-group label i {
    margin-right: 8px;
    color: #667eea;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 버튼 스타일 */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* 고급 설정 토글 */
.advanced-toggle {
    margin: 30px 0;
    text-align: center;
}

/* 고급 설정 패널 */
.advanced-panel {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
    display: none;
    border: 1px solid #e9ecef;
}

.advanced-panel.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.advanced-panel h3 {
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.setting-group {
    display: flex;
    flex-direction: column;
}

.setting-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.setting-group select,
.setting-group input[type="range"],
.setting-group input[type="color"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
}

.setting-group input[type="color"] {
    height: 45px;
    cursor: pointer;
}

.setting-group input[type="range"] {
    padding: 0;
}

/* 결과 섹션 */
.result-section {
    padding: 40px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.result-section h2 {
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
}

.qr-result {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 30px;
    align-items: start;
}

.qr-preview {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.qr-preview img {
    max-width: 250px;
    height: auto;
    border-radius: 8px;
}

.qr-info {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.qr-info p {
    margin-bottom: 15px;
    word-break: break-all;
}

.qr-info strong {
    color: #667eea;
}

#qrSettings {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

#qrSettings h4 {
    margin-bottom: 10px;
    color: #333;
}

#settingsList {
    list-style: none;
    padding-left: 0;
}

#settingsList li {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

#settingsList li:last-child {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* 로딩 스피너 */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 에러 메시지 */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message i {
    font-size: 1.2rem;
}

/* 푸터 */
.footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .qr-generator {
        padding: 25px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .qr-result {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .qr-generator {
        padding: 20px;
    }
    
    .result-section {
        padding: 20px;
    }
}
