* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.main-content {
    padding: 40px;
}

section {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

section h2 {
    color: #667eea;
    margin-bottom: 25px;
    font-size: 1.8em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.prompt-group {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
}

.prompt-group h3 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3em;
    padding-left: 10px;
    border-left: 4px solid #667eea;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.toggle-password {
    margin-top: 8px;
    padding: 6px 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.3s ease;
}

.toggle-password:hover {
    background: #5a6268;
}

.action-section {
    text-align: center;
    margin: 40px 0;
}

.action-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    min-width: 200px;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.generate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.save-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 16px 36px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
    min-width: 160px;
}

.save-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.45);
}

.save-btn:active:not(:disabled) {
    transform: translateY(0);
}

.save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.save-status {
    margin-top: 12px;
    font-weight: 600;
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px 14px;
    border-radius: 8px;
    display: inline-block;
}

.save-status.error {
    color: #721c24;
    background: #f8d7da;
    border-color: #f5c6cb;
}

.results-section {
    margin-top: 40px;
}

.result-group {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-group h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.2em;
    padding-left: 10px;
    border-left: 4px solid #28a745;
}

.result-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    min-height: 100px;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
    color: #212529;
    margin-bottom: 15px;
}

.loading-text {
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
    align-self: flex-end;
}

.copy-btn:hover {
    background: #218838;
}

.copy-btn:active {
    transform: scale(0.98);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-top: 20px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .main-content {
        padding: 20px;
    }

    section {
        padding: 20px;
    }

    .generate-btn {
        width: 100%;
        padding: 14px;
    }
}

/* 滚动条样式 */
textarea::-webkit-scrollbar,
.result-content::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track,
.result-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb,
.result-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover,
.result-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

