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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: #f4f7f6; /* 밝고 부드러운 배경색 */
    color: #333333; /* 텍스트는 짙은 회색으로 가독성 확보 */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* 로그인 오버레이 */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(244, 247, 246, 0.85); /* 배경과 어울리는 반투명 색상 */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.login-box {
    text-align: center;
    max-width: 400px;
    padding: 40px;
    box-sizing: border-box;
}

.login-box h2 {
    margin-bottom: 15px;
}

.login-box p {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.login-box input[type="password"] {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 5px;
}

.login-box input[type="password"]:focus {
    border-color: #FF8021;
    box-shadow: 0 0 0 2px rgba(255, 128, 33, 0.2);
}

.error-msg {
    color: #e74c3c !important;
    font-size: 0.85rem !important;
    margin-bottom: 15px !important;
    margin-top: 5px;
}

/* 배경 동적 도형 요소 (Premium 디자인용 - 주황색 테마 적용) */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #FF8021; /* 메인 포인트 오렌지 */
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: #FFB373; /* 밝은 오렌지 */
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #FFD2B3; /* 더 밝은 피치/오렌지 */
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Glassmorphism 메인 컨테이너 (밝은 테마용) */
.glass-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.05);
    width: 90%;
    max-width: 800px;
    padding: 40px;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
}

header p {
    font-size: 1rem;
    color: #666666;
}

/* 파일 업로드 영역 */
.upload-section {
    margin-bottom: 30px;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    background: rgba(255, 128, 33, 0.05); /* 오렌지빛 배경 */
    border: 2px dashed rgba(255, 128, 33, 0.4);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-label:hover, .upload-label.dragover {
    background: rgba(255, 128, 33, 0.1);
    border-color: #FF8021;
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.upload-text {
    text-align: center;
    line-height: 1.6;
    margin-bottom: 10px;
    color: #444;
}

.highlight {
    color: #FF8021;
    font-weight: 700;
}

.file-name {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
    word-break: break-all;
}

/* 설정 및 결과 영역 공통 스타일 */
.settings-section, .result-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    animation: slideUp 0.5s ease forwards;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
    margin-top: 20px;
}

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

select {
    padding: 12px 15px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #ddd;
    color: #333;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

select option {
    background: #ffffff;
    color: #333;
}

select:focus {
    border-color: #FF8021;
    box-shadow: 0 0 0 2px rgba(255, 128, 33, 0.2);
}

/* 버튼 스타일 */
.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.primary-btn {
    background: #FF8021;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 128, 33, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    background: #e66d15;
    box-shadow: 0 6px 20px rgba(255, 128, 33, 0.4);
}

.success-btn {
    background: #222222; /* 결과 다운로드 버튼은 세련된 블랙으로 매칭 */
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

.success-btn:hover {
    transform: translateY(-2px);
    background: #000000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 테이블 스타일 */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #eaeaea;
}

th {
    background: #fafafa;
    font-weight: 700;
    color: #333;
}

tr:last-child td {
    border-bottom: none;
}

/* 로딩 오버레이 (밝은 테마용) */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 128, 33, 0.2);
    border-top-color: #FF8021;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-overlay p {
    color: #333;
    font-weight: 500;
}

/* 유틸리티 클래스 */
.hidden {
    display: none !important;
}

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

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

/* 모바일 반응형 */
@media (max-width: 600px) {
    .glass-container {
        padding: 20px;
        width: 95%;
    }
    
    header h1 {
        font-size: 2rem;
    }
}
