/* Global Styles */
:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --secondary-bg: #f0f2f5;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-sub: #666666;
    --border-color: #dddddd;

    /* Scenario Colors */
    --scenario-a-color: #6c757d;
    /* Gray - Conservative */
    --scenario-b-color: #4a90e2;
    /* Blue - Neutral */
    --scenario-c-color: #dc3545;
    /* Red - Aggressive */

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--secondary-bg);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

header h1 {
    margin: 0 0 10px 0;
    color: var(--text-main);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header p {
    color: var(--text-sub);
    margin: 0;
    font-size: 1rem;
}

/* Home Button */
.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin-bottom: 15px;
    color: var(--text-sub);
    text-decoration: none;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-home:hover {
    background-color: #f1f3f5;
    color: var(--text-main);
    border-color: #ced4da;
}

.btn-home i {
    font-size: 0.85rem;
}

/* Card Style */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    margin-bottom: 30px;
}

.card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card h2 i {
    color: var(--primary-color);
}

/* Input Section */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-sub);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.hint {
    font-size: 0.75rem;
    color: #adb5bd;
    margin-top: 4px;
}

.auto-calc-hint {
    text-align: center;
    color: #adb5bd;
    font-size: 0.85rem;
    margin: 15px 0 0 0;
}

.auto-calc-hint i {
    color: var(--primary-color);
}

/* Results Section */
.results-section {
    margin-top: 30px;
}

.results-section>h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-section>h2 i {
    color: var(--primary-color);
}

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

/* Scenario Cards */
.scenario-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 25px;
    border: 2px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

.scenario-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.scenario-a {
    border-color: var(--scenario-a-color);
}

.scenario-b {
    border-color: var(--scenario-b-color);
}

.scenario-c {
    border-color: var(--scenario-c-color);
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f5;
}

.scenario-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.scenario-a .scenario-header h3 {
    color: var(--scenario-a-color);
}

.scenario-b .scenario-header h3 {
    color: var(--scenario-b-color);
}

.scenario-c .scenario-header h3 {
    color: var(--scenario-c-color);
}

.rate-badge {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

.scenario-a .rate-badge {
    background-color: var(--scenario-a-color);
}

.scenario-b .rate-badge {
    background-color: var(--scenario-b-color);
}

.scenario-c .rate-badge {
    background-color: var(--scenario-c-color);
}

/* Period Results */
.period-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.period-item {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: var(--radius-md);
    border: 1px solid #e9ecef;
}

.period-item.highlight {
    background-color: #fff3cd;
    border-color: #ffc107;
}

.period-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 8px;
    font-weight: 500;
}

.total-amount {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}

.profit-amount {
    display: block;
}

.card h2 i {
    color: var(--primary-color);
}

/* Input Section */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-sub);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.hint {
    font-size: 0.75rem;
    color: #adb5bd;
    margin-top: 4px;
}

.auto-calc-hint {
    text-align: center;
    color: #adb5bd;
    font-size: 0.85rem;
    margin: 15px 0 0 0;
}

.auto-calc-hint i {
    color: var(--primary-color);
}

/* Results Section */
.results-section {
    margin-top: 30px;
}

.results-section>h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-section>h2 i {
    color: var(--primary-color);
}

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

/* Scenario Cards */
.scenario-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 25px;
    border: 2px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

.scenario-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.scenario-a {
    border-color: var(--scenario-a-color);
}

.scenario-b {
    border-color: var(--scenario-b-color);
}

.scenario-c {
    border-color: var(--scenario-c-color);
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f5;
}

.scenario-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.scenario-a .scenario-header h3 {
    color: var(--scenario-a-color);
}

.scenario-b .scenario-header h3 {
    color: var(--scenario-b-color);
}

.scenario-c .scenario-header h3 {
    color: var(--scenario-c-color);
}

.rate-badge {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

.scenario-a .rate-badge {
    background-color: var(--scenario-a-color);
}

.scenario-b .rate-badge {
    background-color: var(--scenario-b-color);
}

.scenario-c .rate-badge {
    background-color: var(--scenario-c-color);
}

/* Period Results */
.period-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.period-item {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: var(--radius-md);
    border: 1px solid #e9ecef;
}

.period-item.highlight {
    background-color: #fff3cd;
    border-color: #ffc107;
}

.period-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 8px;
    font-weight: 500;
}

.total-amount {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}

.profit-amount {
    display: block;
    font-size: 0.9rem;
    color: #28a745;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 600px) {
    .input-grid {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 15px 40px;
    }
}

/* SEO Content Section */
.seo-content {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.seo-box {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.seo-box h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.seo-box p {
    color: #555;
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
    word-break: keep-all;
}

.seo-box strong {
    color: #333;
    font-weight: 700;
}