:root {
    --primary-color: #4361ee;
    --primary-light: #edf2fb;
    --primary-dark: #3a0ca3;
    --secondary-color: #f72585;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --gray: #ddd;
    --dark-gray: #aaa;
    --white: #fff;
    --border-radius: 10px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 1rem;
    margin-bottom: 1rem;
    flex: 1;
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    font-size: 2rem;
}

h2 {
    color: var(--primary-dark);
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
}

/* 탭 스타일링 */
.tabs-container {
    overflow-x: auto;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    min-width: max-content;
}

.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    background: var(--light-gray);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    width: 80px;
    height: 80px;
    font-size: 0.9rem;
}

.tab-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tab-btn:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 입력 필드 */
.input-container {
    margin: 1.5rem 0;
}

.input-field {
    display: flex;
    align-items: center;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.input-field input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    padding: 0.8rem 0.5rem;
    width: 70%;
}

.input-field select {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    padding: 0.8rem 0.5rem;
    width: 30%;
    border-left: 1px solid var(--gray);
    cursor: pointer;
    font-weight: 500;
}

input:focus, select:focus {
    outline: none;
}

/* 직접 변환 결과 */
.direct-result {
    background-color: var(--primary-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 1rem 0;
}

.direct-result p {
    font-size: 1.8rem;
    color: var(--primary-dark);
    font-weight: 500;
}

/* 결과 테이블 */
.results-container {
    margin-top: 2rem;
}

.table-container {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

tbody tr {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid var(--gray);
}

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

tbody tr.highlight {
    background-color: var(--primary-light);
    font-weight: 500;
}

/* 푸터 */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}

/* 반응형 설계 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        margin: 0;
        border-radius: 0;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .tabs-container {
        margin-bottom: 1rem;
    }
    
    .tab-btn {
        width: 70px;
        height: 70px;
        font-size: 0.8rem;
    }
    
    .input-field input {
        font-size: 1.3rem;
    }
    
    .input-field select {
        font-size: 1rem;
    }
    
    .direct-result p {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        width: 60px;
        height: 60px;
        padding: 0.5rem;
        font-size: 0.7rem;
    }
    
    .tab-btn i {
        font-size: 1.2rem;
    }
    
    .input-field {
        flex-direction: column;
    }
    
    .input-field input {
        width: 100%;
        text-align: center;
    }
    
    .input-field select {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--gray);
        margin-top: 0.5rem;
    }
}