:root {
    --primary: #ff9800;
    /* Friendly Orange */
    --primary-web: #f57c00;
    --accent: #4caf50;
    /* Trust Green */
    --text: #4e342e;
    --bg: #fffbf0;
    --white: #ffffff;
    --border: #ffe0b2;
}

body {
    font-family: "M PLUS Rounded 1c", sans-serif;
    color: var(--text);
    background-color: var(--bg);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 45px;
}

.logo h1 {
    font-size: 1.2rem;
    color: var(--primary-web);
    margin: 0;
}

.header-btn {
    background: var(--accent);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.header-btn:hover {
    background: #43a047;
}

/* Hero */
.hero {
    margin-top: 30px;
    margin-bottom: 40px;
    text-align: center;
}

.hero-box {
    background: var(--white);
    border: 3px dashed var(--primary);
    border-radius: 15px;
    padding: 30px;
}

.hero h2 {
    color: var(--primary-web);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1rem;
    color: #6d4c41;
}

/* Ranking */
.ranking-area {
    margin-bottom: 60px;
}

.area-title {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 40px;
    color: #333;
}

.marker {
    background: linear-gradient(transparent 60%, rgba(255, 152, 0, 0.4) 60%);
    padding: 0 5px;
}

.rank-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    position: relative;
    border: 2px solid transparent;
}

.rank-1 {
    border-color: var(--primary);
    transform: scale(1.02);
}

.crown-badge,
.rank-badge {
    position: absolute;
    top: -15px;
    left: 20px;
    background: #bbb;
    color: var(--white);
    padding: 5px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.rank-1 .crown-badge {
    background: #ffcc00;
    color: #5d4037;
    font-size: 1.3rem;
    padding: 8px 30px;
}

.rank-badge {
    background: #90a4ae;
}

.card-inner {
    padding: 30px 25px 25px;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 15px;
    margin-top: 10px;
}

.card-head h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text);
}

.badge-cp {
    background: var(--primary);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.price-box {
    background: #fff8e1;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.price-row {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.price-row:last-child {
    margin-bottom: 0;
}

.price-row .label {
    width: 80px;
    font-weight: bold;
    font-size: 0.9rem;
    color: #795548;
}

.price-row .val {
    font-weight: bold;
    font-size: 1rem;
}

.price-row .val.red {
    color: #d32f2f;
}

.price-row .val.green {
    color: #388e3c;
}

.desc {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
}

.btn-area {
    text-align: center;
}

.btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 0;
    border-radius: 8px;
    font-weight: bold;
    transition: opacity 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    font-size: 1.1rem;
    box-shadow: 0 4px 0 #ef6c00;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn:hover {
    opacity: 0.9;
}

/* Table */
.table-section {
    margin-bottom: 60px;
}

.table-wrap {
    overflow-x: auto;
}

.comp-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    min-width: 500px;
}

.comp-table th,
.comp-table td {
    padding: 15px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 0.95rem;
}

.comp-table th {
    background: var(--primary);
    color: var(--white);
}

.comp-table .name {
    font-weight: bold;
    text-align: left;
}

.comp-table .highlight {
    background: #fffde7;
    border: 2px solid var(--primary);
}

/* Footer */
.footer {
    background: #fff3e0;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.8rem;
    color: #795548;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    /* Keep button visible but smaller/stacked */
    .header-btn {
        display: inline-block;
        font-size: 0.8rem;
        padding: 5px 15px;
    }

    .hero {
        margin-top: 20px;
    }

    .hero-box {
        padding: 20px;
    }

    .hero h2 {
        font-size: 1.3rem;
    }

    .rank-card .crown-badge,
    .rank-card .rank-badge {
        position: relative;
        top: 0;
        left: 0;
        display: inline-block;
        margin-bottom: 10px;
        transform: translateY(-50%);
        /* Pull up slightly */
    }

    .card-inner {
        padding-top: 0;
        /* Adjust for relative badge */
    }

    .card-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .price-row {
        flex-direction: column;
        align-items: flex-start;
        background: #fff;
        /* Scoped background for readability */
        padding: 5px;
        border-radius: 4px;
        margin-bottom: 8px;
    }

    .price-row .val {
        margin-left: 0;
        padding-left: 10px;
    }

    .flow-steps {
        flex-direction: column;
    }

    .arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }
}

/* Simulation Table */
.simulation-section {
    margin-bottom: 60px;
}

.sim-box {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #ffe0b2;
}

.sim-desc {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
}

.sim-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    min-width: 600px;
}

.sim-table th,
.sim-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.sim-table th {
    background: #fff3e0;
    color: #e65100;
}

.sim-table .highlight {
    background: #fffde7;
    border: 2px solid var(--accent);
}

.sim-table .result {
    font-weight: bold;
    color: var(--accent);
    font-size: 1.1rem;
}

.note {
    font-size: 0.8rem;
    color: #999;
    text-align: right;
}

/* Payment Flow */
.flow-section {
    margin-bottom: 60px;
}

.flow-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.step-card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    width: 200px;
    text-align: center;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #ffe0b2;
    position: relative;
    overflow: hidden;
}

.step-head {
    background: #ffe0b2;
    color: #e65100;
    font-weight: bold;
    padding: 5px 0;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.step-card h4 {
    margin: 0 0 10px;
    color: var(--text);
}

.step-card p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.cost-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.cost-badge.free {
    background: #e8f5e9;
    color: #2e7d32;
}

.cost-badge.low {
    background: #fff3e0;
    color: #e65100;
}

.cost-badge.main {
    background: #ffebee;
    color: #c62828;
}

.arrow {
    color: var(--primary);
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .flow-steps {
        flex-direction: column;
    }

    .arrow {
        transform: rotate(90deg);
    }
}