ishop/public/css/style.css
2025-08-10 19:27:58 +08:00

926 lines
18 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', 'Microsoft YaHei', sans-serif;
line-height: 1.6;
color: #e0e0e0;
background: #0a0a0a;
min-height: 100vh;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* 页面头部样式 */
.site-header {
text-align: center;
padding: 40px 20px;
background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
border-radius: 20px;
margin-bottom: 40px;
box-shadow:
0 20px 40px rgba(0, 0, 0, 0.4),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
border: 1px solid #333;
}
.site-header h1 {
font-size: 2.5em;
color: #ffffff;
margin-bottom: 10px;
font-weight: 700;
background: linear-gradient(45deg, #ffd700, #ffed4a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}
.site-header p {
font-size: 1.1em;
color: #b0b0b0;
margin: 0;
}
main {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 40px;
align-items: start;
position: relative;
flex: 1;
}
/* 联系我们按钮 */
.contact-floating-btn {
position: fixed;
top: 30px;
right: 30px;
z-index: 1000;
background: linear-gradient(135deg, #28a745, #20c997);
color: white;
border: none;
border-radius: 50px;
padding: 12px 25px;
font-size: 14px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}
.contact-floating-btn:hover {
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}
/* 产品卡片 */
.product-section {
background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
border-radius: 20px;
padding: 30px;
box-shadow:
0 20px 40px rgba(0, 0, 0, 0.4),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
border: 1px solid #333;
}
.product-card {
text-align: center;
}
.product-image {
width: 100%;
height: 280px;
background: linear-gradient(135deg, #333 0%, #444 100%);
border-radius: 15px;
margin-bottom: 25px;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
border: 2px solid #444;
position: relative;
}
.product-image::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(45deg, transparent 49%, rgba(255, 215, 0, 0.1) 50%, transparent 51%);
pointer-events: none;
}
.product-image img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
border-radius: 10px;
}
.product-info h2 {
color: #ffffff;
margin-bottom: 15px;
font-size: 2em;
font-weight: 600;
}
.product-description {
color: #b0b0b0;
margin-bottom: 25px;
line-height: 1.6;
font-size: 1.1em;
}
.price {
font-size: 2.2em;
font-weight: bold;
margin-bottom: 20px;
background: linear-gradient(45deg, #ffd700, #ffed4a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}
.price .currency,
.price .unit {
font-size: 0.7em;
color: #888;
}
/* 订单表单 */
.order-section {
background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
border-radius: 20px;
padding: 30px;
box-shadow:
0 20px 40px rgba(0, 0, 0, 0.4),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
border: 1px solid #333;
}
/* 表单区域样式 */
.order-summary-section,
.shipping-info-section {
margin-bottom: 30px;
}
.order-summary-section .form-group {
margin-bottom: 0;
}
.section-title {
color: #ffffff;
font-size: 1.3em;
font-weight: 600;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #ffd700;
display: flex;
align-items: center;
}
.section-title::before {
content: '';
width: 4px;
height: 20px;
background: linear-gradient(135deg, #ffd700, #ffed4a);
border-radius: 2px;
margin-right: 10px;
}
/* 分割线样式 */
.section-divider {
height: 1px;
background: linear-gradient(90deg, transparent, #444, transparent);
margin: 30px 0;
position: relative;
}
.section-divider::after {
content: '';
position: absolute;
top: -2px;
left: 50%;
transform: translateX(-50%);
width: 8px;
height: 4px;
background: #ffd700;
border-radius: 2px;
}
/* 价格汇总样式 */
.price-summary {
background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
border-radius: 12px;
padding: 20px;
border: 1px solid #333;
margin-top: 15px;
}
.price-line {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
color: #e0e0e0;
font-size: 1.1em;
}
.price-line:first-child {
border-bottom: 1px solid #444;
margin-bottom: 8px;
padding-bottom: 12px;
}
.discount-line {
color: #28a745 !important;
font-weight: 600;
}
.subtotal-line {
color: #ffc107;
text-decoration: line-through;
opacity: 0.7;
}
.total-line {
font-weight: bold;
font-size: 1.3em;
color: #ffd700;
padding-top: 8px;
border-top: 1px solid #444;
margin-top: 8px;
}
#unit-price {
color: #ffd700;
}
/* 优惠提示样式 */
.discount-tips {
margin-top: 20px;
padding: 15px;
background: linear-gradient(145deg, #0f1419, #1a2332);
border-radius: 10px;
border: 1px solid #2c3e50;
}
.tip-item {
display: flex;
align-items: center;
margin-bottom: 10px;
color: #b0b0b0;
font-size: 14px;
}
.tip-item:last-child {
margin-bottom: 0;
}
.tip-badge {
width: 20px;
text-align: center;
margin-right: 8px;
}
.tip-item strong {
color: #ffd700;
}
.form-group {
margin-bottom: 25px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #ffffff;
font-size: 1.1em;
}
.form-group input,
.form-group textarea {
width: 100%;
padding: 15px;
border: 2px solid #444;
border-radius: 10px;
font-size: 16px;
background: #0a0a0a;
color: #e0e0e0;
transition: all 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus {
outline: none;
border-color: #ffd700;
box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
background: #1a1a1a;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
color: #666;
}
/* 数量控制 */
.quantity-controls {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 20px;
justify-content: center;
}
.quantity-controls button {
width: 45px;
height: 45px;
border: 2px solid #ffd700;
background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
color: #ffd700;
border-radius: 50%;
font-size: 20px;
cursor: pointer;
transition: all 0.3s ease;
font-weight: bold;
}
.quantity-controls button:hover {
background: linear-gradient(145deg, #ffd700, #ffed4a);
color: #000;
transform: scale(1.05);
box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}
.quantity-controls input {
width: 80px;
text-align: center;
margin: 0;
font-weight: bold;
font-size: 18px;
}
.total-price {
font-size: 1.3em;
font-weight: bold;
text-align: center;
padding: 15px;
background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
border-radius: 10px;
border: 2px solid #333;
background: linear-gradient(45deg, #ffd700, #ffed4a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
/* 按钮 */
.order-btn {
width: 100%;
padding: 18px;
background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);
color: #000;
border: none;
border-radius: 12px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
position: relative;
overflow: hidden;
}
.order-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.5s;
}
.order-btn:hover::before {
left: 100%;
}
.order-btn:hover {
transform: translateY(-3px);
box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4);
}
.order-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
/* 模态框 */
.modal {
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
display: flex;
justify-content: center;
align-items: center;
backdrop-filter: blur(5px);
}
.modal-content {
background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
padding: 0;
border-radius: 20px;
width: 90%;
max-width: 500px;
max-height: 90vh;
overflow: hidden;
border: 1px solid #444;
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}
.modal-header {
background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);
color: #000;
padding: 25px;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
margin: 0;
font-size: 1.4em;
font-weight: bold;
}
.close {
color: #000;
font-size: 28px;
font-weight: bold;
cursor: pointer;
transition: opacity 0.3s;
}
.close:hover {
opacity: 0.7;
}
.modal-body {
padding: 30px;
background: #1a1a1a;
}
.order-summary {
margin-bottom: 30px;
}
.order-summary h4 {
color: #ffffff;
margin-bottom: 20px;
font-size: 1.3em;
font-weight: 600;
}
.summary-item {
display: flex;
justify-content: space-between;
margin-bottom: 12px;
padding: 10px 0;
border-bottom: 1px solid #333;
color: #e0e0e0;
}
.summary-item:last-child {
border-bottom: none;
font-weight: bold;
color: #ffd700;
font-size: 1.1em;
}
.payment-section {
text-align: center;
padding: 25px;
background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
border-radius: 12px;
border: 1px solid #333;
}
.payment-section p {
color: #b0b0b0;
margin-bottom: 20px;
font-size: 1.1em;
}
.pay-btn {
background: linear-gradient(135deg, #ffd700, #ffed4a);
color: #000;
border: none;
padding: 15px 35px;
border-radius: 10px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
}
.pay-btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}
/* 支付状态 */
.payment-status {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #0a0a0a;
z-index: 2000;
display: flex;
justify-content: center;
align-items: center;
}
.status-content {
text-align: center;
padding: 50px;
background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
border-radius: 20px;
border: 1px solid #444;
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}
.status-icon {
width: 100px;
height: 100px;
margin: 0 auto 30px;
}
.loading-spinner {
width: 100px;
height: 100px;
border: 6px solid #333;
border-top: 6px solid #ffd700;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.status-content h3 {
color: #ffffff;
margin-bottom: 15px;
font-size: 2em;
}
.status-content p {
color: #b0b0b0;
margin-bottom: 30px;
font-size: 1.2em;
}
.order-info {
background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
padding: 25px;
border-radius: 12px;
margin-bottom: 30px;
border: 1px solid #333;
}
.order-info p {
margin-bottom: 12px;
color: #e0e0e0;
font-size: 1.1em;
}
.status-btn {
background: linear-gradient(135deg, #ffd700, #ffed4a);
color: #000;
border: none;
padding: 15px 35px;
border-radius: 10px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
}
.status-btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}
/* 成功/失败图标 */
.success-icon {
color: #00ff88;
font-size: 100px;
text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}
.error-icon {
color: #ff4757;
font-size: 100px;
text-shadow: 0 0 30px rgba(255, 71, 87, 0.5);
}
/* 响应式设计 */
@media (max-width: 768px) {
.site-header h1 {
font-size: 2em;
}
.site-header p {
font-size: 1em;
}
main {
grid-template-columns: 1fr;
gap: 30px;
}
.product-section,
.order-section {
padding: 25px;
}
.modal-content {
width: 95%;
margin: 10px;
}
.modal-body {
padding: 25px;
}
.status-content {
padding: 30px;
margin: 20px;
}
.contact-floating-btn {
top: 20px;
right: 20px;
padding: 10px 20px;
font-size: 12px;
}
.footer-content {
flex-direction: column;
text-align: center;
gap: 15px;
}
.admin-link-btn {
align-self: center;
}
}
/* 管理员登录表单样式 */
.login-form .form-group {
margin-bottom: 20px;
}
.login-form label {
display: block;
margin-bottom: 8px;
color: #ffffff;
font-weight: 600;
}
.login-form input {
width: 100%;
padding: 12px 15px;
background: #0a0a0a;
border: 2px solid #444;
border-radius: 8px;
color: #e0e0e0;
font-size: 16px;
transition: all 0.3s ease;
}
.login-form input:focus {
outline: none;
border-color: #ffd700;
box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
background: #1a1a1a;
}
.login-form .form-actions {
display: flex;
gap: 15px;
justify-content: flex-end;
margin-top: 25px;
}
.login-form .btn-primary {
padding: 12px 25px;
background: linear-gradient(135deg, #ffd700, #ffed4a);
color: #000;
border: none;
border-radius: 8px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
}
.login-form .btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}
.login-form .btn-secondary {
padding: 12px 25px;
background: linear-gradient(145deg, #333, #444);
color: #e0e0e0;
border: 1px solid #555;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
}
.login-form .btn-secondary:hover {
background: linear-gradient(145deg, #444, #555);
transform: translateY(-2px);
}
.error-message {
color: #ff4757;
font-size: 14px;
margin-top: 10px;
padding: 8px 12px;
background: rgba(255, 71, 87, 0.1);
border: 1px solid #ff4757;
border-radius: 6px;
text-align: center;
}
/* 联系我们模态框样式 */
.contact-info {
text-align: center;
color: #e0e0e0;
}
.contact-info h4 {
color: #ffffff;
margin-bottom: 15px;
font-size: 1.4em;
font-weight: 600;
}
.contact-info > p {
color: #b0b0b0;
margin-bottom: 25px;
font-size: 1.1em;
}
.qr-code-container {
margin: 25px 0;
padding: 25px;
background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
border-radius: 15px;
border: 2px dashed #444;
position: relative;
}
.qr-code-container::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(45deg, transparent 49%, rgba(40, 167, 69, 0.1) 50%, transparent 51%);
pointer-events: none;
border-radius: 13px;
}
.wechat-qr {
max-width: 200px;
max-height: 200px;
border-radius: 10px;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
border: 2px solid #28a745;
}
.qr-error {
color: #ff4757;
font-size: 14px;
padding: 20px;
background: rgba(255, 71, 87, 0.1);
border-radius: 10px;
border: 1px solid #ff4757;
}
.qr-error p {
margin: 8px 0;
}
.contact-tips {
background: linear-gradient(145deg, #0f2e0f, #1a4a1a);
padding: 20px;
border-radius: 12px;
border: 1px solid #28a745;
margin-top: 25px;
position: relative;
}
.contact-tips::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 4px;
background: linear-gradient(135deg, #28a745, #20c997);
border-radius: 2px;
}
.contact-tips p {
margin: 10px 0;
color: #a8e6a1;
font-size: 15px;
font-weight: 500;
padding-left: 15px;
}
/* 页面底部样式 */
.site-footer {
margin-top: 60px;
padding: 30px 0;
background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
border-radius: 20px;
border: 1px solid #333;
text-align: center;
}
.footer-content {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 20px;
padding: 0 30px;
}
.footer-content p {
color: #b0b0b0;
margin: 0;
font-size: 14px;
}
.admin-link-btn {
background: linear-gradient(135deg, #444, #555);
color: #e0e0e0;
border: 1px solid #666;
border-radius: 25px;
padding: 8px 16px;
font-size: 12px;
cursor: pointer;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 1px;
}
.admin-link-btn:hover {
background: linear-gradient(135deg, #555, #666);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}