* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.container {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
    padding: 40px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #6a11cb, #2575fc);
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 28px;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 600;
    font-size: 15px;
}

.select-container {
    position: relative;
}

.select-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    z-index: 1;
}

select {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #f8f9fa;
    appearance: none;
    cursor: pointer;
}

select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
    background-color: #7f8c8d;
}

.select-container::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    pointer-events: none;
}

textarea {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    resize: vertical;
    min-height: 200px;
    transition: all 0.3s;
    background-color: #f8f9fa;
    font-family: inherit;
}

textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
    background-color: #7f8c8d;
}

.char-count {
    text-align: right;
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 5px;
}

.button-group {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

button {
    padding: 14px 25px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

#submitBtn {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

#submitBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

#submitBtn:active {
    transform: translateY(-1px);
}

#resetBtn {
    background-color: #f0f0f0;
    color: #555;
    border: 2px solid #e0e0e0;
}

#resetBtn:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    display: none;
    animation: fadeIn 0.5s;
}

.success {
    background-color: #d4f8e6;
    color: #0a5c36;
    border: 1px solid #a8e6cf;
}

.error {
    background-color: #fde2e2;
    color: #c53030;
    border: 1px solid #fcb8b8;
}

/* 新增响应区域样式 */
.response-area {
    margin-top: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #27ae60;
}

.response-area h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.response-content {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 30px 25px;
    }

    h1 {
        font-size: 24px;
    }

    .button-group {
        flex-direction: column;
    }

    textarea {
        min-height: 180px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 25px 20px;
        border-radius: 12px;
    }

    h1 {
        font-size: 22px;
    }

    select, #numberSelect {
        padding: 12px 15px 12px 40px;
    }

    button {
        padding: 12px 20px;
    }

    textarea {
        min-height: 160px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 360px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px 15px;
    }

    textarea {
        min-height: 140px;
    }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
    .container {
        max-width: 650px;
    }

    textarea {
        min-height: 220px;
    }
}

/* 高分辨率屏幕优化 */
@media (min-resolution: 2dppx) {
    .container {
        border: 0.5px solid #e0e0e0;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .container {
        background-color: #2c3e50;
        color: #ecf0f1;
    }

    h1, label {
        color: #ecf0f1;
    }

    select, textarea {
        background-color: #34495e;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }

    .subtitle, .char-count {
        color: #bdc3c7;
    }

    #resetBtn {
        background-color: #34495e;
        color: #ecf0f1;
        border-color: #4a5f7a;
    }

    .response-area {
        background-color: #34495e;
    }

    .response-area h3 {
        color: #ecf0f1;
    }

    .response-content {
        background-color: #2c3e50;
        color: #ecf0f1;
        border-color: #4a5f7a;
    }
}