/* 기본 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body 스타일
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}
 */
/* 네비게이션 */
nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 0 20px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    white-space: nowrap;
}
/* 
nav a:hover {
    background: #667eea;
    color: white;
}

nav a.active {
    background: #667eea;
    color: white;
} 
    */

/* 컨테이너 */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 90px);
    padding: 20px;
}

/* 컨텐츠 박스 */
.content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 800px;
}

/* 홈 페이지 컨텐츠 */
.home-content {
    max-width: 800px;
    padding: 60px 40px;
    text-align: center;
}

/* 결과 페이지 컨텐츠 */
.result-content {
    max-width: 800px;
}

.result-content-wide {
    max-width: 800px;
}

/* 제목 */
h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.home-content h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

/* 단락 */
p {
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.home-content p {
    margin-bottom: 30px;
}

/* 폼 그룹 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}

/* 입력 필드 */
input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}
/* 
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
} */

textarea {
    font-family: 'Courier New', monospace;
    resize: vertical;
    min-height: 150px;
}

/* 변환 행 (길이/무게 변환용) */
.conversion-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 라디오 그룹 (BASE64용) */
.radio-group {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-option input[type="radio"] {
    width: auto;
    cursor: pointer;
}

.radio-option label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

/* 버튼 
button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}
*/
button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.button-group button {
    width: auto;
    padding: 12px 30px;
}

/* 정보 박스
.info {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}
 */
.info p {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.info strong {
    color: #333;
}

/* 에러 메시지 */
.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
    text-align: center;
}

/* 결과 박스
.result-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.result-box h2 {
    color: #667eea;
    font-size: 18px;
    margin-bottom: 10px;
}
 */
.expression {
    color: #666;
    font-size: 14px;
    word-break: break-all;
    margin-bottom: 10px;
    line-height: 1.6;
}

.result-value {
    color: #333;
    font-size: 20px;
    font-weight: bold;
}

/* 정보 박스 (자리 계산용) 
.info-box {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 25px;
    border-left: 4px solid #2196F3;
}
*/
.info-box p {
    color: #333;
    margin: 5px 0;
}

/* 변환 결과 표시 */
.conversion-display {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}
/* 
.arrow {
    color: #667eea;
    font-size: 30px;
    margin: 0 10px;
}

.result-box .result-value {
    color: #667eea;
    font-size: 32px;
    word-break: break-all;
} */

/* BASE64 결과 섹션 */
.result-section {
    margin-bottom: 25px;
}
/* 
.result-section h2 {
    color: #667eea;
    font-size: 18px;
    margin-bottom: 10px;
}

.text-box {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #667eea;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    width: auto;
} 
    */

.copy-btn:hover {
    background: #5568d3;
    transform: none;
}

/* 숫자 표시 (숫자 단위 변환용) */
.number-display {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 25px;
    border-left: 4px solid #2196F3;
    text-align: center;
}

.number-display h2 {
    color: #2196F3;
    font-size: 32px;
    font-family: 'Courier New', monospace;
}

/* 숫자 단위 결과 박스 */
.result-box .flag {
    font-size: 32px;
    margin-right: 15px;
}
/* 
.result-box .language {
    color: #667eea;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
} 
    */

.result-box .value {
    color: #333;
    font-size: 24px;
    font-weight: bold;
    line-height: 2;
}

.result-content {
    flex: 1;
}

/* Ruby (후리가나) 스타일 */
ruby {
    ruby-position: over;
}

rt {
    font-size: 0.5em;
    color: #666;
}

/* 일본어 결과만 특별 스타일 */
.japanese-result .value {
    line-height: 2.5;
}

/* 홈 페이지 기능 박스 */
.feature-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
/* 
.feature {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.feature h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 16px;
} 
    */

.feature p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .content {
        padding: 30px 20px;
    }

    .home-content {
        padding: 40px 30px;
    }

    h1 {
        font-size: 24px;
    }

    .home-content h1 {
        font-size: 28px;
    }

    .conversion-row {
        grid-template-columns: 1fr;
    }

    .feature-box {
        grid-template-columns: 1fr;
    }

    nav ul {
        gap: 10px;
    }

    nav a {
        padding: 8px 12px;
        font-size: 14px;
    }
}