441 lines
7.7 KiB
CSS
Executable File
441 lines
7.7 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, #F0FFF0 0%, #98FB98 50%, #90EE90 100%);
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
color: #1D1D1F;
|
|
line-height: 1.47;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
/* 隐藏滚动条但保留滚动功能 */
|
|
scrollbar-width: none; /* Firefox */
|
|
-ms-overflow-style: none; /* IE/Edge */
|
|
}
|
|
|
|
/* 隐藏Webkit浏览器的滚动条 */
|
|
body::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
/* 全局滚动条隐藏 */
|
|
* {
|
|
scrollbar-width: none; /* Firefox */
|
|
-ms-overflow-style: none; /* IE/Edge */
|
|
}
|
|
|
|
*::-webkit-scrollbar {
|
|
display: none; /* Chrome, Safari, Opera */
|
|
}
|
|
|
|
/* 容器样式 - iOS毛玻璃效果 */
|
|
.container {
|
|
max-width: 700px;
|
|
margin: 0 auto;
|
|
background: rgba(255, 255, 255, 0.85);
|
|
border-radius: 24px;
|
|
padding: 32px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
backdrop-filter: blur(20px) saturate(180%);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
/* 头部样式 - iOS风格 */
|
|
.header {
|
|
text-align: center;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.title {
|
|
font-size: 2.25rem;
|
|
color: #1D1D1F;
|
|
margin-bottom: 8px;
|
|
font-weight: 600;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.subtitle {
|
|
color: #86868B;
|
|
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: #1D1D1F;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.form-input {
|
|
width: 100%;
|
|
padding: 16px;
|
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
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: #32CD32;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
box-shadow: 0 0 0 4px rgba(50, 205, 50, 0.1);
|
|
}
|
|
|
|
.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: #32CD32;
|
|
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(50, 205, 50, 0.25);
|
|
}
|
|
|
|
.btn:hover {
|
|
background: #228B22;
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 16px rgba(50, 205, 50, 0.35);
|
|
}
|
|
|
|
.btn:active {
|
|
transform: translateY(0);
|
|
background: #006400;
|
|
}
|
|
|
|
.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: #1D1D1F;
|
|
margin-bottom: 16px;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.loading {
|
|
display: none;
|
|
text-align: center;
|
|
color: #32CD32;
|
|
font-style: normal;
|
|
padding: 24px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.suggestions-container {
|
|
background: rgba(255, 255, 255, 0.6);
|
|
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
border-radius: 16px;
|
|
padding: 20px;
|
|
min-height: 150px;
|
|
backdrop-filter: blur(10px);
|
|
display: grid;
|
|
gap: 16px;
|
|
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
}
|
|
|
|
.placeholder {
|
|
text-align: center;
|
|
color: #86868B;
|
|
font-style: normal;
|
|
padding: 40px 20px;
|
|
font-weight: 400;
|
|
}
|
|
|
|
/* 分组标题样式 - iOS风格 */
|
|
.convention-group-title {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
color: white;
|
|
margin: 16px 0 12px 0;
|
|
padding: 10px 16px;
|
|
background: #32CD32;
|
|
border-radius: 12px;
|
|
text-align: center;
|
|
box-shadow: 0 2px 8px rgba(50, 205, 50, 0.25);
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
.convention-group-title:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
/* 建议项样式 - iOS风格 */
|
|
.suggestion-item {
|
|
background: rgba(255, 255, 255, 0.9);
|
|
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
border-radius: 12px;
|
|
padding: 12px;
|
|
margin-bottom: 0;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
position: relative;
|
|
backdrop-filter: blur(10px);
|
|
min-height: 80px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.suggestion-item:hover {
|
|
border-color: rgba(50, 205, 50, 0.3);
|
|
box-shadow: 0 4px 16px rgba(50, 205, 50, 0.1);
|
|
background: rgba(255, 255, 255, 0.95);
|
|
}
|
|
|
|
.suggestion-item:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.variable-name {
|
|
font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
color: #1D1D1F;
|
|
margin-bottom: 4px;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.variable-description {
|
|
font-size: 0.875rem;
|
|
color: #86868B;
|
|
line-height: 1.4;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.copy-btn {
|
|
position: absolute;
|
|
top: 8px;
|
|
right: 8px;
|
|
background: #32CD32;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 6px;
|
|
padding: 4px 8px;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
opacity: 0;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 1px 3px rgba(50, 205, 50, 0.25);
|
|
}
|
|
|
|
.suggestion-item:hover .copy-btn {
|
|
opacity: 1;
|
|
}
|
|
|
|
.copy-btn:hover {
|
|
background: #228B22;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* 错误样式 - 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: 10px;
|
|
}
|
|
|
|
.container {
|
|
padding: 20px;
|
|
margin: 10px;
|
|
}
|
|
|
|
.title {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.form-input {
|
|
padding: 12px;
|
|
}
|
|
|
|
.btn {
|
|
padding: 12px;
|
|
}
|
|
|
|
.suggestions-container {
|
|
padding: 15px;
|
|
grid-template-columns: 1fr;
|
|
gap: 12px;
|
|
}
|
|
|
|
.suggestion-item {
|
|
padding: 10px;
|
|
min-height: 70px;
|
|
}
|
|
|
|
.copy-btn {
|
|
position: static;
|
|
opacity: 1;
|
|
margin-top: 6px;
|
|
width: 100%;
|
|
padding: 6px 8px;
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
.variable-name {
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.variable-description {
|
|
font-size: 0.8rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.title {
|
|
font-size: 1.8rem;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.container {
|
|
padding: 15px;
|
|
}
|
|
|
|
.form-input {
|
|
padding: 10px;
|
|
}
|
|
|
|
.suggestions-container {
|
|
padding: 12px;
|
|
gap: 10px;
|
|
}
|
|
|
|
.suggestion-item {
|
|
padding: 8px;
|
|
min-height: 60px;
|
|
}
|
|
|
|
.variable-name {
|
|
font-size: 0.85rem;
|
|
margin-bottom: 3px;
|
|
}
|
|
|
|
.variable-description {
|
|
font-size: 0.75rem;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.convention-group-title {
|
|
font-size: 0.9rem;
|
|
padding: 8px 12px;
|
|
margin: 12px 0 8px 0;
|
|
}
|
|
}
|
|
|
|
/* 动画效果 */
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.suggestion-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;
|
|
} |