* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 450px;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title {
    text-align: center;
    color: #333;
    font-size: 28px;
    margin-bottom: 25px;
    font-weight: 600;
}

.price-info {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.price-item {
    text-align: center;
}

.price-item .label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.price-item .value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.status-section {
    margin-bottom: 25px;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    animation: pulse 2s infinite;
}

.status-dot.active {
    background: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.info-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    color: white;
}

.info-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.info-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.info-unit {
    font-size: 12px;
    opacity: 0.8;
}

.total-price {
    font-size: 36px !important;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-start {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.btn-stop {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-reset {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.btn-icon {
    font-size: 20px;
}

.history-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

.history-section h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.history-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
}

.history-time {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.history-details {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    color: #333;
}

.history-details span {
    font-weight: bold;
    color: #667eea;
}

.manual-input-section {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 12px;
    border: 1px solid #ffc107;
}

.manual-input-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #856404;
}

.tip-icon {
    font-size: 16px;
}

.manual-input-group {
    display: flex;
    gap: 10px;
}

.manual-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ffc107;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.manual-input:focus {
    border-color: #ff9800;
}

.btn-manual {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    padding: 12px 20px;
    font-size: 16px;
}

.warning-tip {
    margin-top: 15px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #2196f3;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1565c0;
}

.pwa-install-prompt {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.pwa-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pwa-content .tip-text {
    flex: 1;
    font-size: 14px;
}

.btn-install {
    padding: 8px 16px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-install:hover {
    transform: scale(1.05);
}

.btn-install:active {
    transform: scale(0.95);
}

/* 移动端适配 */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .info-value {
        font-size: 28px;
    }
    
    .total-price {
        font-size: 30px !important;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}