* {
    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;
}

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

.header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

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

.header-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.header-text {
    flex: 1;
}

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

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

.controls {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.controls h2 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

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

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

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

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

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

.ships-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ships-section h2 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.filter-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.filter-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

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

.ship-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.ship-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.ship-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

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

.ship-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-completed {
    background: #e5e7eb;
    color: #4b5563;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.ship-info {
    margin-bottom: 15px;
}

.ship-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}

.ship-info-label {
    color: #6b7280;
    font-weight: 500;
}

.ship-info-value {
    color: #333;
    font-weight: 500;
}

.ship-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.ship-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    min-width: 80px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 16px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn {
    flex: 1;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background: #10b981;
}

.notification.error {
    background: #ef4444;
}

.notification.info {
    background: #3b82f6;
}

@media (max-width: 768px) {
    .ships-grid {
        grid-template-columns: 1fr;
    }
    
    .ship-actions {
        flex-direction: column;
    }
    
    .ship-actions .btn {
        width: 100%;
    }
}

/* 锚地监控区域样式 */
.anchorage-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 2px solid #3b82f6;
}

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

.anchorage-header h2 {
    color: #333;
    font-size: 20px;
    margin: 0;
}

.anchorage-info {
    background: #eff6ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3b82f6;
}

.anchorage-info p {
    margin: 0;
    color: #1e40af;
    font-size: 14px;
    line-height: 1.6;
}

.size-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.size-supramax {
    background: #dbeafe;
    color: #1e40af;
}

.size-capesize {
    background: #fef3c7;
    color: #92400e;
}

.size-handymax {
    background: #d1fae5;
    color: #065f46;
}

.size-panamax {
    background: #e0e7ff;
    color: #3730a3;
}

.size-ultramax {
    background: #fce7f3;
    color: #831843;
}

/* 地图样式 */
#ship-map {
    height: 450px;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid #e0e0e0;
    z-index: 1;
}

/* 移动端优化 */
@media (max-width: 768px) {
    body { padding: 10px; }
    .header { padding: 15px; }
    .header-content { flex-direction: column; text-align: center; }
    .header-logo { width: 60px; height: 60px; }
    .header h1 { font-size: 20px; }
    .header p { font-size: 12px; }
    .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .tabs::-webkit-scrollbar { display: none; }
    .tab { white-space: nowrap; font-size: 13px; padding: 10px 16px; }
    .card { padding: 15px; margin-bottom: 15px; }
    .card h2 { font-size: 18px; margin-bottom: 15px; }
    #ship-map { height: 300px; margin-bottom: 20px; }
    .ship-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
    .ship-table thead, .ship-table tbody, .ship-table tr { display: table; width: 100%; table-layout: fixed; }
    .ship-table th, .ship-table td { padding: 8px; font-size: 12px; min-width: 80px; }
    .form-grid { grid-template-columns: 1fr; gap: 15px; }
    .form-group input, .form-group select, .form-group textarea { font-size: 16px; }
    .btn { padding: 10px 20px; font-size: 14px; }
    .action-buttons { flex-direction: column; gap: 8px; }
    .action-buttons button { width: 100%; font-size: 12px; padding: 8px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 15px; }
    .stat-value { font-size: 24px; }
    .stat-label { font-size: 12px; }
    .modal-content { padding: 20px; width: 95%; max-height: 85vh; }
    .modal-header { font-size: 18px; }
    .notification { right: 10px; left: 10px; font-size: 13px; padding: 12px 16px; }
}

@media (max-width: 375px) {
    .header h1 { font-size: 18px; }
    .tab { font-size: 12px; padding: 8px 12px; }
    .stats-grid { grid-template-columns: 1fr; }
    #ship-map { height: 250px; }
}

@media (max-width: 768px) and (orientation: landscape) {
    #ship-map { height: 250px; }
}
