/* 연구소 라벨 제작 프로그램 - 파란색 계열 모던 스타일 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #276ef1 0%, #1e5fd8 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* 헤더 컨테이너 */
.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.logo-section {
    display: flex;
    align-items: center;
}

.company-logo {
    background: white;
    color: #276ef1;
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid #276ef1;
    box-shadow: 0 4px 15px rgba(39, 110, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.company-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(39, 110, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.company-logo:hover::before {
    left: 100%;
}

.logo-text {
    font-size: 1.4em;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    z-index: 1;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin: 0;
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 300px;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    h1 {
        font-size: 2em;
        text-align: center;
    }
    
    .logo-text {
        font-size: 1.2em;
    }
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 1.1em;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e3f2fd;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8faff;
    color: #2c3e50;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #276ef1;
    box-shadow: 0 0 15px rgba(39, 110, 241, 0.2);
    transform: translateY(-2px);
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23276ef1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 50px;
}

.form-sections {
    display: grid;
    gap: 30px;
}

.section-title {
    color: #276ef1;
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3f2fd;
}

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

.submit-btn {
    background: linear-gradient(45deg, #276ef1, #1e5fd8);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 40px auto 0;
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(39, 110, 241, 0.3);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(39, 110, 241, 0.4);
    background: linear-gradient(45deg, #1e5fd8, #276ef1);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.form-section {
    background: rgba(227, 242, 253, 0.3);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #276ef1;
    margin-bottom: 20px;
}

.form-section.hidden {
    display: none;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-weight: 500;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    input[type="text"],
    input[type="number"],
    select {
        padding: 12px;
    }
    
    .submit-btn {
        padding: 15px 30px;
        font-size: 1.1em;
    }
}

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

.container {
    animation: fadeIn 0.6s ease-out;
}

.form-group {
    animation: fadeIn 0.6s ease-out;
}

/* 호버 효과 */
.form-group:hover input,
.form-group:hover select {
    border-color: #4a7fff;
}

/* 로딩 스피너 */
.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.spinner {
    border: 4px solid #e3f2fd;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* 성공 메시지 애니메이션 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 로딩 상태 개선 */
.submit-btn:disabled {
    cursor: not-allowed;
    transform: none !important;
}

/* 담당자 정보 스타일 */
.contact-info {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    margin: 30px auto 0;
    max-width: 500px;
    border-left: 4px solid #276ef1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.contact-title {
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
    color: #276ef1;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3f2fd;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.contact-icon {
    font-size: 1.1em;
    width: 20px;
    text-align: center;
}

.contact-label {
    font-weight: 600;
    color: #6f7b85;
    min-width: 80px;
}

.contact-value {
    color: #2c3e50;
    font-weight: 500;
    flex: 1;
}

.contact-link {
    color: #276ef1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: #1e5fd8;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .contact-info {
        margin: 20px 10px 0;
        padding: 20px;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .contact-label {
        min-width: auto;
    }
}

/* 클릭 버튼 스타일 */
.option-group {
    display: grid;
    gap: 12px;
    width: 100%;
}

/* 문서 종류는 2개 컬럼 */
.option-group:has([onclick*="selectDocType"]) {
    grid-template-columns: 1fr 1fr;
}

/* 바인더 크기는 4개 컬럼 */
.option-group:has([onclick*="selectBinderSize"]) {
    grid-template-columns: repeat(4, 1fr);
}

.option-button {
    background: #f8faff;
    border: 2px solid #e3f2fd;
    padding: 15px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #6f7b85;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    text-align: center;
    min-height: 80px;
    width: 100%;
}

.option-button:hover {
    border-color: #276ef1;
    background: rgba(39, 110, 241, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 110, 241, 0.1);
}

.option-button.active {
    background: #276ef1;
    border-color: #276ef1;
    color: white;
    box-shadow: 0 4px 15px rgba(39, 110, 241, 0.3);
}

.option-button.active:hover {
    background: #1e5fd8;
    border-color: #1e5fd8;
}

.option-icon {
    font-size: 1.5em;
}

.option-button span:last-child {
    font-size: 0.9em;
    line-height: 1.2;
}

@media (max-width: 768px) {
    /* 모바일에서는 문서 종류도 세로 배치 */
    .option-group:has([onclick*="selectDocType"]) {
        grid-template-columns: 1fr;
    }
    
    /* 모바일에서는 바인더 크기를 2x2 그리드로 */
    .option-group:has([onclick*="selectBinderSize"]) {
        grid-template-columns: 1fr 1fr;
    }
    
    .option-button {
        min-height: 70px;
        padding: 12px 8px;
    }
    
    .option-icon {
        font-size: 1.3em;
    }
    
    .option-button span:last-child {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    /* 작은 화면에서는 모든 버튼을 세로 배치 */
    .option-group:has([onclick*="selectBinderSize"]) {
        grid-template-columns: 1fr;
    }
}