* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.view-container {
    min-height: 100vh;
}

.city-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.city-page-header {
    text-align: center;
    margin-bottom: 56px;
}

.city-logo {
    font-size: 72px;
    margin-bottom: 16px;
}

.city-page-title {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.city-page-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
}

.city-list-section {
    width: 100%;
    max-width: 900px;
}

.city-list-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
    text-align: center;
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.city-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.city-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.city-card-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.city-card-name {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.city-card-desc {
    font-size: 13px;
    color: #888;
}

.city-page-footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.back-btn {
    padding: 8px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    color: #555;
    font-weight: 500;
    transition: all 0.2s;
}

.back-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.app-header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 48px;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

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

.header-right {
    display: flex;
    gap: 12px;
}

.city-badge, .date-badge {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.price-standard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.standard-item {
    padding: 12px 16px;
    background: #f8f9fc;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.standard-item.highlight {
    background: linear-gradient(135deg, #fff5f5, #fff0f6);
    border: 1px solid #ffd6e7;
}

.standard-label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.standard-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

.float-rules h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.float-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.float-item.peak {
    background: linear-gradient(90deg, #fff5f5, #fff0f0);
}

.float-item.offpeak {
    background: linear-gradient(90deg, #f0fff4, #f0fff9);
}

.float-item.normal {
    background: #f8f9fc;
}

.float-label {
    font-weight: 600;
    font-size: 13px;
}

.float-item.peak .float-label {
    color: #e53e3e;
}

.float-item.offpeak .float-label {
    color: #38a169;
}

.float-time {
    font-size: 12px;
    color: #666;
}

.float-rate {
    font-weight: 700;
    font-size: 13px;
}

.float-item.peak .float-rate {
    color: #e53e3e;
}

.float-item.offpeak .float-rate {
    color: #38a169;
}

.fare-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.form-group input[type="number"],
.form-group input[type="time"],
.form-group input[type="date"] {
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

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

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.segment-section {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px dashed #e0e0e0;
}

.segment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.segment-header h3 {
    font-size: 15px;
    color: #1a1a2e;
}

.btn-secondary {
    padding: 6px 14px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.segments-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.segment-item {
    display: grid;
    grid-template-columns: 180px 140px 140px auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: #f8f9fc;
    border-radius: 8px;
}

.segment-item select,
.segment-item input {
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    width: 100%;
}

.segment-remove {
    padding: 6px 8px;
    background: #fed7d7;
    color: #c53030;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.segment-remove:hover {
    background: #feb2b2;
}

.hint-text {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.required {
    color: #e53e3e;
    font-weight: 700;
    margin-left: 4px;
}

.error-text {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 8px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 16px;
}

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

.result-card .card-header {
    align-items: center;
}

.result-total {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fc;
    border-radius: 8px;
}

.breakdown-item.total {
    background: linear-gradient(135deg, #667eea15, #764ba215);
    border: 1.5px solid #667eea40;
    font-weight: 700;
}

.breakdown-label {
    font-size: 14px;
    color: #555;
}

.breakdown-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

.breakdown-detail {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.breakdown-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 20px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.calc-steps-section {
    margin-bottom: 8px;
}

.calc-steps-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.seg-step {
    background: #f8f9fc;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
}

.seg-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e0e0e0;
}

.seg-step-index {
    font-weight: 700;
    font-size: 14px;
    color: #667eea;
    background: #eef0ff;
    padding: 4px 10px;
    border-radius: 6px;
}

.seg-step-time {
    font-size: 13px;
    color: #555;
    font-weight: 600;
}

.seg-step-period {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #e0e7ff;
    color: #4f46e5;
    font-weight: 500;
}

.seg-step-row {
    font-size: 12px;
    color: #555;
    line-height: 1.9;
    word-break: break-all;
}

.seg-step-row.seg-step-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
    font-weight: 600;
    color: #1a1a2e;
    font-size: 13px;
}

.total-fee-row {
    background: linear-gradient(135deg, #667eea15, #764ba215);
    border: 1.5px solid #667eea40;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    color: #1a1a2e;
    font-weight: 600;
    margin-bottom: 8px;
}

.total-fee-row strong {
    color: #667eea;
    font-size: 16px;
}

.result-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #e0e0e0;
}

.disclaimer {
    font-size: 12px;
    color: #999;
    line-height: 1.6;
}

.chat-card {
    display: flex;
    flex-direction: column;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
}

.status-dot.online {
    background: #48bb78;
    box-shadow: 0 0 8px #48bb78;
}

.chat-messages {
    flex: 1;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 90%;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.user-message .message-avatar {
    background: #e0e0e0;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.6;
    font-size: 14px;
}

.bot-message .message-content {
    background: #f8f9fc;
    border-top-left-radius: 4px;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-top-right-radius: 4px;
}

.message-content p {
    margin-bottom: 8px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    padding-left: 20px;
    margin-bottom: 8px;
}

.message-content li {
    margin-bottom: 4px;
}

.message-content em {
    color: #667eea;
    font-style: normal;
    font-weight: 500;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.chat-input-area textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-send {
    padding: 0 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send:hover {
    transform: translateY(-1px);
}

@media (max-width: 960px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .price-standard {
        grid-template-columns: 1fr;
    }

    .fare-form .form-row {
        grid-template-columns: 1fr;
    }

    .app-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .header-left {
        flex-direction: column;
    }
}
