/* Base Styles */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background: linear-gradient(-45deg, #da7d60, #c2829a, #71a4b7, #6b6ac7);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Header Styles */
h1 {
    font-family: "Bebas Neue", sans-serif;
    font-size: 3rem;
    text-align: center;
    background: linear-gradient(90deg, #995ad4, #cfbbb1, #2e99c6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    background-color: rebeccapurple;
    letter-spacing: 2px;
    animation: fadeIn 1.5s ease-in;
    border-radius: 8px;
    margin-bottom: 30px;
    padding: 20px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 20px;
    background-color: rgba(0, 0, 0, 0.3);
}

th {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(52, 73, 94, 0.9));
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 16px;
    backdrop-filter: blur(10px);
}

td {
    padding: 20px 15px;
    border-bottom: 1px solid rgba(238, 238, 238, 0.5);
    vertical-align: top;
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(0, 0, 0, 0.4);
    color: wheat;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Column Widths */
.image-column {
    width: 220px;
}

.title-column {
    width: 300px;
}

.description-column {
    width: auto;
}

/* News Date Styling */
.news-date {
    font-size: 12px;
    color: #b0b0b0;
    font-style: italic;
    margin-top: 5px;
    opacity: 0.8;
}


/* Image Container Styles */
.image-container {
    width: 200px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container:hover {
    transform: scale(1.05);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.2s ease;
    border-radius: 4px;
}

.image-container:hover img {
    transform: scale(1.05);
    opacity: 0.8;
}

/* Image hover effect with text */
.image-container::after {
    content: "🔍 Click to view";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    text-align: center;
    padding: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-container:hover::after {
    opacity: 1;
}

/* Shimmer effect */
.image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
    z-index: 1;
}

/* Text Content */
h3 {
    margin: 0 0 8px 0;
    color: #f7f7f7;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* News Date Styling */
.news-date {
    font-size: 12px;
    color: #b0b0b0;
    font-style: italic;
    margin-top: 5px;
    opacity: 0.8;
}

p {
    margin: 0;
    color: #d4d7bd;
    line-height: 1.6;
    font-size: 14px;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}

.error {
    text-align: center;
    padding: 20px;
    color: #d32f2f;
    background-color: rgba(255, 235, 238, 0.9);
    border-radius: 4px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
}

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

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 1001;
}

.modal-close:hover {
    color: #f44336;
}

.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: background-color 0.2s ease;
    user-select: none;
}

.modal-navigation:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-align: center;
}

/* Background Animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Floating Shapes */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.floating-shapes::before,
.floating-shapes::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 15s infinite linear;
}

.floating-shapes::before {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: -5s;
}

.floating-shapes::after {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: -10s;
    animation-duration: 20s;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid rgba(185, 139, 118, 0.815);
        margin-bottom: 10px;
        border-radius: 12px;
        background: rgba(212, 162, 162, 0.1);
        backdrop-filter: blur(10px);
        padding: 10px;
        text-align: left;
    }

    td {
        border: none;
        position: relative;
        padding: 15px;
        background: transparent;
        padding-left: 50%;
    }

    td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        text-align: left;
        font-weight: bold;
        color: #e2b1a0;
        display: block;
        margin-bottom: 5px;
    }

    .image-container {
        width: 100%;
        max-width: 300px;
        height: 180px;
        margin: 0 auto;
    }

    .modal-navigation {
        font-size: 25px;
        padding: 8px 12px;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }

    .modal-info {
        font-size: 14px;
        padding: 8px 15px;
    }

    h1 {
        font-size: 2rem;
        padding: 15px;
    }

    .title-column {
        width: auto;
    }
}

/* Additional fix for very small screens */
@media (max-width: 480px) {
    .image-container {
        max-width: 250px;
        height: 150px;
    }
    
    td {
        padding-left: 10px;
        font-size: 14px;
    }
    
    td:before {
        position: relative;
        width: 100%;
        display: block;
        margin-bottom: 5px;
        left: 0;
    }
    
    .title-column, .description-column, .image-column {
        padding-left: 10px !important;
    }
}
