Files
InfoGenie/InfoGenie-frontend/public/aimodelapp/AI生成Linux命令/styles.css
2025-10-15 11:11:23 +08:00

576 lines
10 KiB
CSS
Executable File

/* 全局样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* 主体样式 - iOS风格 */
body {
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
background: linear-gradient(135deg, #a8e6cf 0%, #dcedc8 100%);
min-height: 100vh;
padding: 20px;
color: #2e7d32;
line-height: 1.47;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* 容器样式 - iOS毛玻璃效果 */
.container {
max-width: 900px;
margin: 0 auto;
background: rgba(255, 255, 255, 0.85);
border-radius: 24px;
padding: 32px;
box-shadow: 0 8px 32px rgba(76, 175, 80, 0.15), 0 2px 8px rgba(76, 175, 80, 0.1);
backdrop-filter: blur(20px) saturate(180%);
border: 1px solid rgba(76, 175, 80, 0.2);
}
/* 头部样式 - iOS风格 */
.header {
text-align: center;
margin-bottom: 32px;
}
.title {
font-size: 2.25rem;
color: #1b5e20;
margin-bottom: 8px;
font-weight: 600;
letter-spacing: -0.02em;
}
.subtitle {
color: #4caf50;
font-size: 1.0625rem;
margin-bottom: 24px;
font-weight: 400;
}
/* 表单样式 - iOS风格 */
.form-section {
margin-bottom: 32px;
}
.form-group {
margin-bottom: 24px;
}
.form-label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #2e7d32;
font-size: 1rem;
}
.form-input {
width: 100%;
padding: 16px;
border: 1px solid rgba(76, 175, 80, 0.2);
border-radius: 12px;
font-size: 1rem;
transition: all 0.2s ease;
background: rgba(255, 255, 255, 0.8);
font-family: inherit;
backdrop-filter: blur(10px);
}
.form-input:focus {
outline: none;
border-color: #4caf50;
background: rgba(255, 255, 255, 0.95);
box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15);
}
.textarea {
resize: vertical;
min-height: 120px;
}
.select {
cursor: pointer;
appearance: none;
background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
background-repeat: no-repeat;
background-position: right 15px center;
background-size: 12px;
padding-right: 40px;
}
/* 按钮样式 - iOS风格 */
.btn {
width: 100%;
padding: 16px;
background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
color: white;
border: none;
border-radius: 12px;
font-size: 1.0625rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
margin-bottom: 24px;
box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}
.btn:hover {
background: linear-gradient(135deg, #388e3c 0%, #4caf50 100%);
transform: translateY(-1px);
box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
}
.btn:active {
transform: translateY(0);
background: linear-gradient(135deg, #2e7d32 0%, #388e3c 100%);
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
background: #86868B;
}
/* 结果区域样式 - iOS风格 */
.result-section {
margin-top: 32px;
}
.result-title {
font-size: 1.25rem;
color: #1b5e20;
margin-bottom: 16px;
text-align: center;
font-weight: 600;
}
.loading {
display: none;
text-align: center;
color: #4caf50;
font-style: normal;
padding: 24px;
font-weight: 500;
}
.commands-container {
background: rgba(255, 255, 255, 0.6);
border: 1px solid rgba(0, 0, 0, 0.08);
border-radius: 16px;
padding: 24px;
min-height: 150px;
backdrop-filter: blur(10px);
}
.placeholder {
text-align: center;
color: #86868B;
font-style: normal;
padding: 40px 20px;
font-weight: 400;
}
/* 分组标题样式 - iOS风格 */
.section-title {
font-size: 1.125rem;
font-weight: 600;
color: white;
margin: 20px 0 12px 0;
padding: 12px 16px;
background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
border-radius: 12px;
text-align: center;
box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}
.section-title:first-child {
margin-top: 0;
}
.section-title.warning {
background: #FF9500;
box-shadow: 0 2px 8px rgba(255, 149, 0, 0.25);
}
.section-title.info {
background: #34C759;
box-shadow: 0 2px 8px rgba(52, 199, 89, 0.25);
}
/* 命令项样式 - iOS风格 */
.command-item {
background: rgba(255, 255, 255, 0.9);
border: 1px solid rgba(0, 0, 0, 0.06);
border-radius: 12px;
padding: 20px;
margin-bottom: 16px;
transition: all 0.2s ease;
position: relative;
backdrop-filter: blur(10px);
}
.command-item:hover {
border-color: rgba(76, 175, 80, 0.3);
box-shadow: 0 4px 16px rgba(76, 175, 80, 0.15);
background: rgba(255, 255, 255, 0.95);
}
.command-item:last-child {
margin-bottom: 0;
}
.command-content {
margin-bottom: 16px;
}
.command-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
flex-wrap: wrap;
gap: 8px;
}
.command-code {
font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
background: #f8f9fa;
padding: 8px 12px;
border-radius: 8px;
font-size: 0.9375rem;
color: #2d3748;
border: 1px solid #e2e8f0;
flex: 1;
min-width: 0;
word-break: break-all;
}
.safety-badge {
padding: 4px 12px;
border-radius: 20px;
font-size: 0.8125rem;
font-weight: 600;
color: white;
white-space: nowrap;
}
.command-description {
font-size: 1rem;
color: #2d3748;
margin-bottom: 12px;
line-height: 1.5;
}
.command-explanation {
font-size: 0.9375rem;
color: #4a5568;
margin-bottom: 12px;
line-height: 1.5;
}
.command-output {
margin-bottom: 12px;
}
.command-output code {
font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
background: #2d3748;
color: #e2e8f0;
padding: 8px 12px;
border-radius: 6px;
font-size: 0.875rem;
display: block;
margin-top: 4px;
white-space: pre-wrap;
word-break: break-all;
}
.command-alternatives {
margin-top: 12px;
}
.alt-command {
font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
background: #e2e8f0;
color: #2d3748;
padding: 4px 8px;
border-radius: 4px;
font-size: 0.8125rem;
margin: 2px 4px 2px 0;
display: inline-block;
cursor: pointer;
transition: all 0.2s ease;
}
.alt-command:hover {
background: #cbd5e0;
transform: translateY(-1px);
}
.copy-btn {
background: #4caf50;
color: white;
border: none;
border-radius: 8px;
padding: 10px 20px;
font-size: 0.875rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
position: absolute;
top: 20px;
right: 20px;
}
.copy-btn:hover {
background: #388e3c;
transform: translateY(-1px);
}
.copy-btn.copied {
background: #34C759;
}
/* 警告容器样式 */
.warnings-container {
margin-bottom: 16px;
}
.warning-item {
background: rgba(255, 149, 0, 0.1);
border: 1px solid rgba(255, 149, 0, 0.2);
border-radius: 8px;
padding: 12px 16px;
margin-bottom: 8px;
color: #b45309;
font-size: 0.9375rem;
line-height: 1.5;
}
.warning-item:last-child {
margin-bottom: 0;
}
/* 前置条件容器样式 */
.prerequisites-container {
margin-bottom: 16px;
}
.prerequisite-item {
background: rgba(52, 199, 89, 0.1);
border: 1px solid rgba(52, 199, 89, 0.2);
border-radius: 8px;
padding: 12px 16px;
margin-bottom: 8px;
color: #166534;
font-size: 0.9375rem;
line-height: 1.5;
}
.prerequisite-item:last-child {
margin-bottom: 0;
}
/* 相关概念容器样式 */
.concepts-container {
margin-bottom: 16px;
}
.concept-item {
background: rgba(59, 130, 246, 0.1);
border: 1px solid rgba(59, 130, 246, 0.2);
border-radius: 8px;
padding: 12px 16px;
margin-bottom: 8px;
color: #1e40af;
font-size: 0.9375rem;
line-height: 1.5;
}
.concept-item:last-child {
margin-bottom: 0;
}
/* 错误样式 - iOS风格 */
.error {
color: #FF3B30;
background: rgba(255, 59, 48, 0.1);
border: 1px solid rgba(255, 59, 48, 0.2);
padding: 16px;
border-radius: 12px;
margin-top: 16px;
font-weight: 500;
backdrop-filter: blur(10px);
}
/* 成功提示 - iOS风格 */
.success-toast {
position: fixed;
top: 20px;
right: 20px;
background: #34C759;
color: white;
padding: 12px 20px;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(52, 199, 89, 0.3);
z-index: 1000;
opacity: 0;
transform: translateX(100%);
transition: all 0.3s ease;
font-weight: 600;
backdrop-filter: blur(20px);
}
.success-toast.show {
opacity: 1;
transform: translateX(0);
}
/* 响应式设计 - 移动端优化 */
@media (max-width: 768px) {
body {
padding: 16px;
}
.container {
padding: 24px;
border-radius: 20px;
}
.title {
font-size: 1.875rem;
}
.subtitle {
font-size: 1rem;
}
.form-input {
padding: 14px;
font-size: 1rem;
}
.btn {
padding: 16px;
font-size: 1rem;
}
.commands-container {
padding: 20px;
}
.command-item {
padding: 16px;
margin-bottom: 16px;
}
.command-header {
flex-direction: column;
align-items: stretch;
}
.command-code {
margin-bottom: 8px;
font-size: 0.875rem;
}
.copy-btn {
position: static;
width: 100%;
margin-top: 12px;
}
.safety-badge {
align-self: flex-start;
}
}
@media (max-width: 480px) {
.title {
font-size: 1.75rem;
}
.container {
padding: 20px;
}
.form-input {
padding: 12px;
}
.command-item {
padding: 12px;
}
.command-code {
font-size: 0.8125rem;
padding: 6px 8px;
}
.command-description,
.command-explanation {
font-size: 0.875rem;
}
}
/* 动画效果 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.command-item {
animation: fadeIn 0.3s ease;
}
/* 加载动画 */
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.loading {
animation: pulse 1.5s ease-in-out infinite;
}
/* 代码字体优化 */
.command-code,
.alt-command,
code {
font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
font-variant-ligatures: none;
}
/* 滚动条样式 */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: rgba(76, 175, 80, 0.1);
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
background: rgba(76, 175, 80, 0.3);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(76, 175, 80, 0.5);
}