/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Arial", sans-serif;
    line-height: 1.6;
    color: #333;
}

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

/* Hero Section */
.hero-section {
    background: url("assets/background.png");
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
    padding-left: 10rem;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
    white-space: nowrap;
}

.hero-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
}

/* Summary Section */
.summary-section {
    background: white;
    padding: 80px 0;
    min-height: 100vh;
}

.summary-content {
    max-width: 800px;
    margin: 0 auto;
}

.summary-content h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 30px;
    color: #1f2937;
}

.summary-text {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 60px;
    color: #6b7280;
    line-height: 1.8;
}

/* Ingestion List */
.ingestion-list {
    margin-bottom: 40px;
}

.ingestion-item {
    background: #F8F9FA;
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.ingestion-item:hover {
    background: #F1F2FE;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.ingestion-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ingestion-flag-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ingestion-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
}

.ingestion-type {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6B7280;
    text-align: center;
    line-height: 1;
}


.meta-divider {
    color: #D1D5DB;
    font-weight: normal;
    user-select: none;
}

.ingestion-info {
    flex: 1;
    padding-left: 16px;
    border-left: 1px solid #E5E7EB;
}

.ingestion-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.ingestion-meta {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    color: #6b7280;
    align-items: center;
}

.record-count,
.ingestion-datetime,
.processing-duration,
.relative-time {
    color: #6b7280;
    font-size: 0.85rem;
}

.ingestion-arrow {
    font-size: 1.2rem;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.ingestion-item:hover .ingestion-arrow {
    transform: translateX(4px);
}

/* View More Button */
.view-more-container {
    text-align: center;
    margin-top: 40px;
}

.view-more-btn,
.contact-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.view-more-btn:hover,
.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.contact-btn {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.contact-btn:hover {
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 30px;
    border-radius: 8px;
    width: 95%;
    max-width: 1200px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #9ca3af;
}

.close:hover {
    color: #4b5563;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-flag {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
}

.modal-title h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 4px;
}

.modal-title p {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Modal Summary */
.modal-summary {
    margin-bottom: 20px;
    padding: 15px;
    background: #F8F9FA;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
}

/* Records Summary */
.records-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #F8F9FA;
    border-radius: 8px;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #374151;
}

.summary-label {
    font-weight: 600;
}

.summary-value {
    color: #059669;
    font-weight: 500;
}

.summary-value.updated {
    color: #0EA5E9;
}

.summary-value.deleted {
    color: #EF4444;
}

.summary-value.new {
    color: #10B981;
}

/* Records Table */
.records-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.records-table th,
.records-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.records-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
    min-width: fit-content;
}

.records-table tr:hover {
    background-color: #f9fafb;
}

.records-table td {
    color: #6b7280;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 8px;
}

/* Modal Footer */
.modal-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
    text-align: center;
}

.modal-contact-btn {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.modal-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .hero-text {
        padding-left: 0;
        max-width: 100%;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }

    .summary-section {
        padding: 60px 0;
    }

    .summary-content h2 {
        font-size: 2rem;
    }

    .ingestion-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .ingestion-flag-container {
        gap: 2px;
    }
    
    .ingestion-flag {
        width: 28px;
        height: 21px;
    }
    
    .ingestion-type {
        font-size: 0.6rem;
    }
    
    .ingestion-info {
        flex: 1;
        min-width: 200px;
    }
    
    .ingestion-title {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .ingestion-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 0.85rem;
    }
    
    .meta-divider {
        display: none;
    }
    
    .record-count,
    .ingestion-datetime,
    .processing-duration,
    .relative-time {
        font-size: 0.8rem;
    }

    .modal-content {
        width: 98%;
        margin: 1% auto;
        padding: 20px;
    }

    .records-table {
        font-size: 0.8rem;
    }

    .records-table th,
    .records-table td {
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
    }
    
    .summary-content h2 {
        font-size: 1.5rem;
    }
    
    .summary-text {
        font-size: 1rem;
    }
    
    .ingestion-item {
        padding: 12px 15px;
        margin-bottom: 12px;
    }
    
    .ingestion-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .ingestion-meta {
        flex-direction: column;
        gap: 4px;
        font-size: 0.75rem;
    }
    
    .ingestion-flag {
        width: 24px;
        height: 18px;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .records-table {
        font-size: 0.7rem;
    }
    
    .records-table th,
    .records-table td {
        padding: 6px 2px;
    }
}
