:root {
    --paper-bg: #f8f1e5;
    --paper-dark: #e6d5b8;
    --ink: #3d2b1f;
    --gold: #b8860b;
    --accent: #5d4037;
    --accent-hover: #3e2723;
    --success: #38a169;
    --warning: #e53e3e;
}

body {
    background-color: #121212;
    background-image: radial-gradient(#2c2c2c 1px, transparent 1px);
    background-size: 20px 20px;
    font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    color: var(--ink);
    line-height: 1.6;
}

.container {
    background: var(--paper-bg);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
        url('https://www.transparenttextures.com/patterns/parchment.png');
    width: 100%;
    max-width: 480px;
    padding: 40px 30px;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 0 100px rgba(184, 134, 11, 0.1);
    border: 1px solid #d4c4a8;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    top: 10px; left: 10px; right: 10px; bottom: 10px;
    border: 2px solid var(--gold);
    opacity: 0.3;
    pointer-events: none;
}

h2 {
    text-align: center;
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #4a3728;
    letter-spacing: 2px;
}

.form-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100px;
    padding: 6px;
    border: 1px solid #dcd0bc;
    border-radius: 4px;
    text-align: right;
    font-size: 16px;
    background: #ffffff;
    color: var(--ink);
}

.settings {
    background-color: rgba(0,0,0,0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    margin-top: 20px;
}

.settings .form-group {
    border-bottom: none;
    margin-bottom: 8px;
}

button {
    width: 100%;
    background-color: var(--accent);
    color: #f8f1e5;
    border: none;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

#results {
    margin-top: 25px;
}

.solution-card {
    background: rgba(255, 255, 255, 0.6);
    border-left: 4px solid var(--success);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.solution-card h3 {
    margin-top: 0;
    color: var(--ink);
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 700;
}

.solution-card ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
}

.warning {
    color: var(--warning);
    font-weight: bold;
    text-align: center;
}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
    opacity: 0.6;
    transition: opacity 0.2s;
    z-index: 10;
}

.back-link:hover {
    opacity: 1;
    text-decoration: underline;
}
