* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.trip-page-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    margin: 0;
    background: white;
    color: #333;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow: visible;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.trip-container {
    /* Keep for backward compatibility, but container is now the main wrapper */
    width: 100%;
}

.trip-header {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
}

.trip-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.trip-header p {
    font-size: 1.1rem;
    color: #666;
}

.trip-form-container {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.trip-form-group {
    margin-bottom: 1.5rem;
}

.trip-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.trip-form-group input,
.trip-form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.trip-form-group input:focus,
.trip-form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.trip-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    .trip-form-row {
        grid-template-columns: 1fr;
    }
}

.trip-submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
}

.trip-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.trip-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.trip-response-container {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: none;
}

.trip-response-container.show {
    display: block;
}

.trip-response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.trip-response-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.trip-loading {
    text-align: center;
    padding: 2rem;
    color: #667eea;
    font-size: 1.1rem;
}

.trip-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: trip-spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes trip-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.trip-response-content {
    color: #333;
    line-height: 1.8;
    font-size: 1rem;
    overflow-x: auto;
}

.trip-response-content h1,
.trip-response-content h2,
.trip-response-content h3,
.trip-response-content h4 {
    color: #667eea;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.trip-response-content h1 {
    font-size: 1.8rem;
}

.trip-response-content h2 {
    font-size: 1.5rem;
}

.trip-response-content h3 {
    font-size: 1.3rem;
}

.trip-response-content ul,
.trip-response-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.trip-response-content li {
    margin-bottom: 0.5rem;
}

.trip-response-content strong {
    color: #333;
    font-weight: 600;
}

.trip-response-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.trip-response-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.trip-response-content pre code {
    background: transparent;
    padding: 0;
}

.trip-response-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

.trip-response-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    table-layout: auto;
}

.trip-response-content table th,
.trip-response-content table td {
    padding: 0.5rem 0.4rem;
    text-align: left;
    border: 1px solid #e0e0e0;
    word-wrap: break-word;
    vertical-align: top;
    max-width: 200px;
}

.trip-response-content table th {
    background: #667eea;
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.trip-response-content table tr:nth-child(even) {
    background: #f9f9f9;
}

.trip-response-content table tr:hover {
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .trip-response-content table {
        font-size: 0.75rem;
    }
    .trip-response-content table th,
    .trip-response-content table td {
        padding: 0.4rem 0.25rem;
        max-width: 150px;
    }
}

.trip-error-message {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid #c33;
}

.trip-clear-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.trip-clear-btn:hover {
    background: #c82333;
}

.trip-download-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.trip-download-btn:hover {
    background: #218838;
}

.trip-download-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.trip-clear-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.trip-share-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.trip-share-btn:hover {
    background: #138496;
}

.trip-share-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Share Modal Styles */
.mytrip-share-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.mytrip-share-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mytrip-share-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

.mytrip-share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.mytrip-share-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.mytrip-share-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.mytrip-share-modal-close:hover {
    background: #f0f0f0;
}

.mytrip-share-url-container {
    margin-bottom: 1.5rem;
    position: relative;
}

.mytrip-share-url-container label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.mytrip-share-url-input {
    width: 100%;
    padding: 0.75rem 3.5rem 0.75rem 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: monospace;
    background-color: #f8f9fa;
    word-break: break-all;
    box-sizing: border-box;
}

.mytrip-share-copy-btn-small {
    position: absolute;
    right: 0.5rem;
    top: 2.1rem; /* Position below label (label ~1.5rem + margin 0.5rem) */
    padding: 0.5rem 1rem;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    z-index: 10;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
}

.mytrip-share-copy-btn-small:hover {
    background-color: #5568d3;
    transform: translateY(-1px);
}

.mytrip-share-copy-btn-small:active {
    transform: scale(0.98);
}

.mytrip-share-modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.mytrip-share-copy-btn,
.mytrip-share-ok-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.mytrip-share-copy-btn {
    background: #667eea;
    color: white;
}

.mytrip-share-copy-btn:hover {
    background: #5568d3;
}

.mytrip-share-copy-btn:active {
    transform: scale(0.98);
}

.mytrip-share-ok-btn {
    background: #6c757d;
    color: white;
}

.mytrip-share-ok-btn:hover {
    background: #5a6268;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.trip-city-radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.trip-city-radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.trip-city-radio-input {
    width: auto;
    cursor: pointer;
}

.trip-city-selection-container {
    display: none;
}

.trip-city-select-wrapper {
    margin-bottom: 1rem;
}

.trip-city-select-label {
    display: block;
    margin-bottom: 0.5rem;
}

.trip-city-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.trip-add-city-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.trip-selected-cities-display {
    margin-top: 1rem;
}

.trip-selected-cities-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.trip-selected-cities-list {
    min-height: 40px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

.trip-city-tag {
    display: inline-block;
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border-radius: 6px;
    font-size: 0.9rem;
}

.trip-city-tag-remove {
    margin-left: 0.5rem;
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 3px;
    padding: 0 0.5rem;
    font-weight: bold;
}

.trip-datetime-radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.trip-datetime-radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.trip-datetime-radio-input {
    width: auto;
    cursor: pointer;
}

.trip-progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 10px;
    margin-top: 1rem;
    height: 20px;
    overflow: hidden;
}

.trip-progress-bar {
    width: 0%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.trip-progress-percent {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

