* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
}

body {
    background: linear-gradient(135deg, #f4f7fb, #eaf1f8);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 26px;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 105, 148, 0.08);
    border: 1px solid #e3eaf3;
}

h1 {
    color: #2a3956;
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #c1272d, #d9a441);
    margin: 12px auto 0;
    border-radius: 2px;
}

.subtitle {
    color: #6b7c93;
    font-size: 0.95rem;
    line-height: 1.6;
}

.app-container {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 30px;
}

.form-section {
    flex: 1;
    min-width: 380px;
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 105, 148, 0.1);
    border: 1px solid #e6eef7;
}

.preview-section {
    flex: 1;
    min-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 105, 148, 0.1);
    border: 1px solid #e6eef7;
}

.section-title {
    color: #2a3956;
    font-size: 1.2rem;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f4f9;
    font-weight: 700;
    width: 100%;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: #c1272d;
    margin-right: 10px;
    vertical-align: -3px;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 18px;
    flex: 1;
}

.form-row {
    display: flex;
    gap: 14px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.92rem;
}

.tip {
    font-weight: 400;
    color: #9aa8ba;
    font-size: 0.8rem;
    margin-left: 6px;
}

input,
select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e6eef7;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #2c3e50;
    transition: all 0.2s;
    background: #fbfdff;
    outline: none;
}

input:focus,
select:focus {
    border-color: #2a3956;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(42, 57, 86, 0.08);
}

input[type="number"] {
    font-size: 1.15rem;
    font-weight: 700;
    color: #c1272d;
    letter-spacing: 0.5px;
}

.sub-input {
    margin-top: 8px;
    font-size: 0.88rem;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7c93' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.hint {
    margin-top: 6px;
    font-size: 0.82rem;
    color: #8b9bb0;
}

.info-card {
    background: #f8fafc;
    border-left: 4px solid #d9a441;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 22px 0;
}

.info-card h3 {
    font-size: 0.95rem;
    color: #2a3956;
    margin-bottom: 10px;
    font-weight: 700;
}

.info-card p {
    font-size: 0.85rem;
    color: #6b7c93;
    line-height: 1.9;
}

button {
    font-family: inherit;
}

.btn-primary,
.btn-secondary,
.btn-copy {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #e0121f, #b0001a);
    color: #fff;
    box-shadow: 0 4px 14px rgba(214, 18, 31, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(214, 18, 31, 0.38);
}

.btn-secondary {
    background: #f4f7fb;
    color: #5a6b80;
}

.btn-secondary:hover {
    background: #e9eff7;
}

.btn-copy {
    background: #fff;
    color: #b0001a;
    border: 2px solid #f3d9a4;
    margin-top: 0;
}

.btn-copy:hover {
    border-color: #d9a441;
}

.preview-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

canvas {
    width: 100%;
    max-width: 375px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(140, 10, 20, 0.22);
    background: #fff;
}

.poster-size {
    margin-top: 14px;
    font-size: 0.8rem;
    color: #9aa8ba;
    text-align: center;
}

.actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 18px;
}

.actions .btn-primary {
    margin-top: 0;
}

.copy-tip {
    font-size: 0.82rem;
    color: #2e9e6b;
    height: 20px;
    margin-top: 10px;
}

footer {
    text-align: center;
    color: #9aa8ba;
    font-size: 0.82rem;
    padding: 10px 0 30px;
}

@media (max-width: 860px) {
    .app-container {
        flex-direction: column;
    }

    .form-section,
    .preview-section {
        min-width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
