* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    /*text-shadow: 2px 2px 4px rgba(0,0,0,0.3);*/
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.input-detail {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}

.input-with-unit input {
    flex: 1;
    padding: 12px 16px;
    padding-right: 50px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    -moz-appearance: textfield;
}

.input-with-unit input::-webkit-outer-spin-button,
.input-with-unit input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-with-unit input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.unit {
    position: absolute;
    right: 16px;
    color: #666;
    font-weight: 500;
    pointer-events: none;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.radio-label:hover {
    background-color: #f0f2ff;
}

.radio-label input[type="radio"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.radio-text {
    font-size: 0.9rem;
    color: #555;
}

.calculation-mode {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #e1e5e9;
}

.calculation-mode h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.1rem;
}

.mode-buttons {
    display: flex;
    gap: 10px;
}

.mode-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.mode-btn:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.mode-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.calculate-btn {
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.calculate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.calculate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.calculate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.results-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e1e5e9;
}

.results-section h3 {
    margin-bottom: 20px;
    color: #555;
    font-size: 1.2rem;
    text-align: center;
}

/*직접 수정*/
/*
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}
*/

.results-grid1 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.results-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}
/*직접 수정*/

.result-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e1e5e9;
    text-align: center;
}

.result-item label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.result-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.result-value.positive {
    color: #28a745;
}

.result-value.negative {
    color: #dc3545;
}

.tax-rate-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e1e5e9;
}

.tax-rate-section h4 {
    margin-bottom: 15px;
    color: #555;
    font-size: 1rem;
    text-align: center;
}

.tax-rate-section .radio-group {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
}

.tax-rate-section .radio-label {
    padding: 10px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
}

.tax-rate-section .radio-label:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.tax-rate-section .radio-label input[type="radio"]:checked + .radio-text {
    color: #667eea;
    font-weight: 600;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .mode-buttons {
        flex-direction: column;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .tax-rate-section .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .input-with-unit input {
        padding: 10px 12px;
        padding-right: 40px;
    }
    
    .unit {
        right: 12px;
        font-size: 0.9rem;
    }
    
    .calculate-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .result-value {
        font-size: 1.1rem;
    }
} 

footer {
    width: 100%;
    text-align: center;
    padding: 20px 0 20px 0;
    font-size: 1rem;
    color: #fff;
    background: transparent;
    position: center;
    z-index: 10;
} 

/* 네비게이션 바 */
nav {
    width: 100%;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    position: relative;
    z-index: 20;
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 30px;
    padding: 18px 30px 10px 30px;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #667eea;
    text-decoration: underline;
}

/* 도움말 메인 박스 스타일 */
.help-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin: 30px 0;
    width: 100%;
}

.help-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #555;
    font-size: 1.5rem;
}

.help-section .help-detail {
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: #555;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 18px;
    text-align: center;
    line-height: 1.6;
}

.help-section .input-group-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 40px;
}

.help-section .input-group {
    margin-bottom: 0;
    gap: 0;
}

.help-section .input-group label {
    font-weight: 600;
    color: #555;
    font-size: 1rem;
    margin-bottom: 8px;
    display: block;
}

.help-section .input-detail {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #555;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 18px;
    text-align: left;
    line-height: 1.6;
}


@media (max-width: 900px) {
    .help-section .input-group-list {
        grid-template-columns: 1fr;
    }
} 

/* index.html의 main만 2열로, help.html의 main은 1열로 보이도록 분리 */
.container > main {
    display: block;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

/* index.html에서만 main에 grid 적용 */
body#index-page .container > main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
} 