/* css/style.css */
* {
    box-sizing: border-box;
}

body, div, p, h1, h2, h3, input, textarea, a {
    padding: 0;
    margin: 0;
    list-style: none;
}

body {
    color: #333;
    font-size: 16px;
    font-family: "微软雅黑", "Microsoft YaHei", sans-serif;
    padding: 20px 0 60px;
    line-height: 1.6;
    background-color: #f9f9f9;
    background-image: radial-gradient(#ccc 1px, transparent 1px),
    radial-gradient(#ccc 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    background-attachment: fixed;
}

.container {
    width: 95%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4CAF50;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 25px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

header:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

header h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.math-link {
    display: inline-block;
    margin-top: 10px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: rgba(33, 150, 243, 0.1);
}

.math-link h2 {
    font-size: 1.2rem;
    color: #2196F3;
    margin: 0;
}

.math-link span {
    color: #FF5722;
    font-weight: bold;
}

.math-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
    background-color: rgba(33, 150, 243, 0.15);
}

main {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.5s ease;
}

#description {
    margin-bottom: 25px;
    color: #555;
    font-size: 1.1rem;
    padding: 15px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 8px;
    border-left: 4px solid #ff9800;
}

#prompt h3 {
    margin: 0 0 15px;
    color: #444;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

#prompt h3::before {
    content: '✏️';
}

textarea {
    width: 100%;
    height: 180px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    outline: none;
    font-size: 16px;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: inherit;
}

textarea:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.char-count-display {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    text-align: right;
    padding-right: 5px;
}

.controls {
    margin: 20px 0 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.controls input[type="button"] {
    padding: 10px 20px;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.controls input[type="button"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.controls input[type="button"]:active {
    transform: translateY(0);
}

.controls .count-input {
    width: 80px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.controls .count-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.option-group {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.option-group:first-of-type {
    margin-top: 20px;
}

.option-group label {
    margin-right: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.option-group label:hover {
    background-color: rgba(76, 175, 80, 0.1);
}

.option-group input[type="radio"] {
    margin-right: 5px;
    cursor: pointer;
}

.green {
    color: #009900;
    font-weight: 500;
}

.red {
    color: #cc0000;
    font-weight: 500;
}

.custom-header {
    margin: 25px 0;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
}

.custom-header label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #1976d2;
}

.custom-header input {
    width: 100%;
    max-width: 400px;
    height: 45px;
    border-radius: 6px;
    border: 2px solid #90caf9;
    padding: 0 15px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.custom-header input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
    outline: none;
}

.btn {
    text-align: center;
    margin: 35px 0;
}

.btn input[type="submit"] {
    width: 140px;
    height: 50px;
    font-size: 18px;
    cursor: pointer;
    margin: 0 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn input[type="submit"]:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn input[type="submit"]:active {
    transform: translateY(0);
}

.info {
    padding: 25px;
    border: 2px dashed #4CAF50;
    line-height: 1.8;
    border-radius: 10px;
    margin-top: 30px;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    position: relative;
}

.info::before {
    content: 'ℹ️';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
}

.info strong, #description strong {
    color: #e53935;
    font-size: 16px;
    display: block;
    margin-bottom: 10px;
}

.info span {
    font-size: 16px;
}

.info img {
    max-width: 350px;
    width: 100%;
    margin: 15px 0;
    border: 2px solid #eee;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.info img:hover {
    transform: scale(1.02);
}

.page-info {
    color: #666;
    font-size: 14px;
    margin-left: 10px;
    padding: 4px 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

a {
    color: #2196F3;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #0b7dda;
    text-decoration: underline;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    main {
        padding: 20px;
    }

    .controls {
        gap: 12px;
    }

    .option-group label {
        display: block;
        margin-bottom: 12px;
        margin-right: 0;
    }

    .btn input[type="submit"] {
        width: 100%;
        margin: 10px 0;
    }

    .custom-header input {
        max-width: 100%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
