:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --warning-gradient: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    --danger-gradient: linear-gradient(135deg, #dc3545 0%, #fd5e53 100%);
    --info-gradient: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    --card-radius: 16px;
}

.header {
    --background-color: rgba(42, 44, 57, 0.9);
}

body {
    padding-top: 80px !important;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
    padding-top: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

.card-style {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--card-radius);
    padding: 1.8rem;
    box-shadow: var(--card-shadow);
    border: none;
    margin-bottom: 1.8rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-style:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.tracking-header {
    text-align: center;
}

.tracking-header h1 {
    color: #2c3e50;
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
}

.tracking-header p {
    color: #6c757d;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-section {
    position: relative;
}

.search-form {
    margin: 0 auto;
}

.search-input {
    border-radius: 12px;
    border: 2px solid #e8ecef;
    padding: 14px 20px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    height: 42px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.3rem rgba(102, 126, 234, 0.2);
}

.btn-search {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    height: 42px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-search:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
    color: white;
}

.section-title {
    position: relative;
    padding-bottom: 0.8rem;
    color: #2c3e50;
    font-weight: 700;
}

.status-timeline {
    position: relative;
}

.status-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    position: relative;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.status-item.status-future {
    opacity: 0.4;
}

.status-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.1rem;
    z-index: 2;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.status-icon.completed {
    background: var(--success-gradient);
    color: white;
}

.status-icon.current {
    background: var(--warning-gradient);
    color: white;
    animation: pulse 2s infinite;
}

.status-icon.future {
    background: #e9ecef;
    color: #6c757d;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.status-content {
    flex: 1;
    background: rgba(248, 249, 250, 0.8);
    padding: 1rem;
    border-radius: 12px;
    min-height: 70px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.status-content:hover {
    background: rgba(248, 249, 250, 1);
    transform: translateX(5px);
}

.status-line {
    position: absolute;
    left: 22px;
    top: 46px;
    width: 3px;
    height: calc(100% - 46px);
    background: #dee2e6;
    z-index: 1;
}

.status-item:last-child .status-line {
    display: none;
}

.order-status-badge {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.6rem;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #721c24;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.1);
}

/* Status-specific colors */
.status-pending .status-icon {
    background: linear-gradient(135deg, #ffc107 0%, #ff9700 100%);
    color: white;
}

.status-pending .status-content {
    border-left-color: #ffc107;
}

.status-processing .status-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.status-processing .status-content {
    border-left-color: #17a2b8;
}

.status-shipped .status-icon {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.status-shipped .status-content {
    border-left-color: #007bff;
}

.status-delivered .status-icon {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.status-delivered .status-content {
    border-left-color: #28a745;
}

/* Successful Delivery Status - NEW for v2.1 */
.status-successful_delivery .status-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #2e7d32 100%);
    color: white;
}

.status-successful_delivery .status-icon.current {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    animation: pulse-green 2s infinite;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.status-successful_delivery .status-icon.completed {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.status-successful_delivery .status-content {
    border-left-color: #4CAF50;
}

.status-successful_delivery .status-content:hover {
    background: rgba(76, 175, 80, 0.05);
    border-left-color: #45a049;
}

/* Pulse animation for successful delivery */
@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.status-cancelled .status-icon {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.status-cancelled .status-content {
    border-left-color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding-top: 15px;
    }

    .tracking-container {
        padding: 1rem;
        max-width: 100%;
    }

    .card-style {
        padding: 1.2rem;
        margin-bottom: 1.2rem;
    }

    .tracking-header h1 {
        font-size: 1.8rem;
    }

    .status-icon {
        width: 40px;
        height: 40px;
        margin-right: 0.8rem;
    }

    .status-line {
        left: 19px;
        top: 40px;
    }

    .search-input,
    .btn-search {
        height: 48px;
    }
}