/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    color: #333;
    overflow: hidden;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 登录页面样式 */
.login-container {
    justify-content: center;
    align-items: center;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    width: 100%;
}

.login-title {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-top: 10px;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

/* 主页样式 */
.main-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    flex: 1;
}

.header {
    text-align: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.user-info {
    color: #666;
    font-size: 14px;
}

.main-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.main-btn {
    padding: 25px;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.main-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.main-btn:active {
    transform: translateY(-1px);
}

/* 搜索页面样式 */
.search-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-box {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    margin-top: 20px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    min-height: 0;
}

.vehicle-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.vehicle-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.vehicle-plate {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.vehicle-info {
    color: #666;
    font-size: 14px;
}

/* 详情页面样式 */
.detail-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vehicle-detail {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.maintenance-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 0px;
    min-height: 0;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}

.maintenance-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.maintenance-info {
    font-weight: 600;
    margin-bottom: 5px;
}

.maintenance-amount {
    color: #dc3545;
    font-weight: 600;
    font-size: 16px;
}

.maintenance-date {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.fixed-bottom {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 20px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    overflow: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 350px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    padding-right: 40px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
}

/* 搜索结果为空时的样式 */
.search-results .loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
}
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 消息提示 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease;
}

.message.show {
    opacity: 1;
}

.message.success {
    background: #28a745;
}

.message.error {
    background: #dc3545;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .login-form {
        padding: 30px 20px;
    }
    
    .main-container,
    .search-container,
    .detail-container {
        padding: 20px;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
        max-width: 320px;
        max-height: 85vh;
    }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 无数据提示样式 */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

/* 错误信息样式 */
.error-message {
    text-align: center;
    padding: 20px;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 12px;
    margin: 20px 0;
}

/* 加载更多按钮样式 */
.load-more {
    text-align: center;
    padding: 15px;
    margin: 20px 0;
    background: #007bff;
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.load-more:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.load-more:active {
    transform: translateY(0);
}