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

:root {
    --dtdc-red: #e31e24;
    --dtdc-dark: #1a1a1a;
    --dtdc-gray: #6c757d;
    --bg-dark: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --border-color: #30363d;
    --success-color: #238636;
    --warning-color: #f0ad4e;
    --error-color: #da3633;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo svg {
    color: var(--dtdc-red);
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--text-primary);
    font-weight: 700;
}

.header-info {
    display: flex;
    gap: 10px;
}

.badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab-btn.active {
    color: var(--dtdc-red);
    border-bottom-color: var(--dtdc-red);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-secondary);
    margin: 5% auto;
    padding: 40px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: var(--dtdc-red);
}

.modal-content h2 {
    color: var(--dtdc-red);
    margin-bottom: 20px;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature {
    text-align: center;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.feature .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.feature h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Search Section */
.search-section {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box select {
    padding: 14px 14px;
    font-size: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-box select:focus {
    border-color: var(--dtdc-red);
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1);
}

.search-box input {
    flex: 1;
    padding: 14px 18px;
    font-size: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: var(--dtdc-red);
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1);
}

.search-box button {
    padding: 14px 28px;
    font-size: 1rem;
    background: var(--dtdc-red);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-box button:hover {
    background: #c41a1f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.3);
}

.search-box button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Recent Searches */
.recent-searches {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.recent-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.recent-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recent-item {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.recent-item:hover {
    background: var(--dtdc-red);
    border-color: var(--dtdc-red);
    color: white;
    transform: translateY(-2px);
}

.recent-item.active {
    background: var(--dtdc-red);
    border-color: var(--dtdc-red);
    color: white;
}

/* Buttons */
.home-btn, .primary-btn {
    padding: 12px 24px;
    background: var(--dtdc-red);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.home-btn:hover, .primary-btn:hover {
    background: #c41a1f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.3);
}

/* Error Message */
.error-msg {
    background: rgba(218, 54, 51, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--dtdc-red);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tracking Result */
.tracking-result {
    animation: fadeIn 0.5s ease;
}

.status-header {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    text-align: center;
}

.status-header h2 {
    color: var(--dtdc-red);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.tracking-number, .reference-no {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 10px;
}

.tracking-number strong, .reference-no strong {
    color: var(--text-primary);
}

/* Shipment Details */
.shipment-details {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-row .value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

/* Milestones */
.milestones-section, .timeline-section {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.milestones-section h3, .timeline-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.milestones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.milestone {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.milestone.completed {
    background: rgba(35, 134, 54, 0.1);
    border-color: var(--success-color);
}

.milestone-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.milestone-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.milestone-location {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-event {
    position: relative;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 25px;
    width: 12px;
    height: 12px;
    background: var(--dtdc-red);
    border-radius: 50%;
    border: 3px solid var(--bg-secondary);
}

.timeline-event::after {
    content: '';
    position: absolute;
    left: -16px;
    top: 37px;
    width: 2px;
    height: calc(100% + 15px);
    background: var(--border-color);
}

.timeline-event:last-child::after {
    display: none;
}

.event-datetime {
    color: var(--dtdc-red);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.event-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.event-status {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.event-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.load-more-btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

/* About Tab */
.about-content {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.about-content h2 {
    color: var(--dtdc-red);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.about-content h3 {
    color: var(--text-primary);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.about-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-content ul, .about-content ol {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-left: 20px;
    margin-bottom: 15px;
}

.about-content li {
    margin-bottom: 10px;
}

.about-content strong {
    color: var(--text-primary);
}

.footer-info {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    
    .search-box button {
        width: 100%;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .detail-row .value {
        text-align: left;
    }
    
    .milestones {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .modal-content {
        padding: 30px 20px;
        margin: 10% auto;
    }
    
    .welcome-features {
        grid-template-columns: 1fr;
    }
}
