* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 40px;
    font-size: 2.5em;
}

.section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: inline-block;
    width: 200px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    width: 150px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.attractions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.attraction-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.attraction-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.attraction-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #667eea;
}

.attraction-item label {
    cursor: pointer;
    margin: 0;
    flex: 1;
    font-weight: normal;
    color: #333;
}

.attraction-item input:checked + label {
    color: #667eea;
    font-weight: 600;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.result-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left: none;
}

.result-section h2 {
    color: white;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.result-header .btn-group {
    display: flex;
    gap: 10px;
}

.result-header h2 {
    margin: 0;
}

.reset-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.clear-save-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-save-btn:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: rgba(255, 100, 100, 0.8);
}

.currency-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.currency-btn {
    flex: 1;
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.currency-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.currency-btn.active {
    background: white;
    color: #667eea;
    border-color: white;
}

.exchange-rate-btn {
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exchange-rate-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.result-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.result-label {
    display: block;
    font-size: 1.1em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.result-value {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.result-currency {
    font-size: 1.2em;
    opacity: 0.9;
}

#breakdown {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

#breakdown p {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 16px;
}

#breakdown p:last-child {
    border-bottom: none;
}

#breakdown p::before {
    content: '• ';
    color: #667eea;
    font-weight: bold;
    font-size: 20px;
}

/* 章节标题区域 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin-bottom: 0;
}

/* 编辑价格按钮 */
.edit-price-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-price-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* 服务项目分组容器 */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.service-group {
    background: white;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    overflow: hidden;
}

.service-group-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 600;
}

.service-group-content {
    padding: 15px;
}

.service-group-content .form-group {
    margin-bottom: 12px;
}

.service-group-content .form-group:last-child {
    margin-bottom: 0;
}

.service-group-content .form-group label {
    width: 80px;
    font-size: 14px;
}

.service-group-content .form-group input {
    width: 120px;
    font-size: 14px;
    padding: 8px 12px;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.3s ease;
}

.close-modal:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 25px;
    max-height: 50vh;
    overflow-y: auto;
}

.modal-body .form-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.modal-body .form-group label {
    width: 150px;
    font-weight: 600;
}

.modal-body .form-group input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

.modal-body .form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
}

.btn-cancel, .btn-save {
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #f0f0f0;
    color: #666;
    border: none;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-save {
    background: #667eea;
    color: white;
    border: none;
}

.btn-save:hover {
    background: #5568d3;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .form-group label {
        width: 150px;
    }

    .attractions-grid {
        grid-template-columns: 1fr;
    }

    .result-value {
        font-size: 2em;
    }

    .services-container {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .modal-body .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-body .form-group label {
        width: 100%;
        margin-bottom: 5px;
    }

    .modal-body .form-group input {
        width: 100%;
    }
}

/* 历史记录按钮 */
.history-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* 大弹窗 */
.modal-large {
    max-width: 700px;
    max-height: 85vh;
}

.modal-large .modal-body {
    max-height: 65vh;
}

/* 历史记录列表 */
#historyList {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.history-item-date {
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
}

.history-item-delete {
    padding: 5px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item-delete:hover {
    background: #c82333;
}

.history-item-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
    color: #555;
}

.history-item-content span {
    padding: 4px 0;
}

.history-search {
    margin-bottom: 15px;
}

.history-search input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.history-search input:focus {
    outline: none;
    border-color: #667eea;
}

.history-empty {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 16px;
}

.history-note {
    grid-column: 1 / -1;
    font-weight: 600;
    color: #667eea;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 8px;
}

/* 遮罩层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 999;
}

.overlay.show {
    display: block;
}

#passwordModal {
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#passwordModal .modal-content {
    margin: 0;
}

/* 新增景点样式 */
.add-attraction-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.add-attraction-section h4 {
    margin-bottom: 15px;
    color: #333;
}

.add-attraction-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-attraction-btn:hover {
    background: #218838;
}
