/* Reset and base styles */
 {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #16a085 0%, #FFFF00 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.06);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #16a085, #27ae60, #f1c40f, #f39c12);
    background-size: 300% 100%;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Header */
h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #16a085 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    letter-spacing: -0.02em;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #16a085, #f39c12);
    border-radius: 2px;
}

/* Table styles */
.table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    font-size: 0.95rem;
}

/* Table header */
thead tr {
    background: linear-gradient(135deg, #16a085 0%, #f39c12 100%);
}

th {
    padding: 18px 16px;
    text-align: left;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    position: relative;
    border: none;
}

th:first-child {
    border-top-left-radius: 16px;
}

th:last-child {
    border-top-right-radius: 16px;
}

/* Table body */
tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f4f8;
}

tbody tr:hover {
    background: linear-gradient(135deg, #e8f8f5 0%, #fef9e7 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 160, 133, 0.15);
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:last-child td:first-child {
    border-bottom-left-radius: 16px;
}

tbody tr:last-child td:last-child {
    border-bottom-right-radius: 16px;
}

td {
    padding: 16px;
    border: none;
    vertical-align: middle;
    color: #334155;
    font-weight: 500;
}

/* Alternate row colors */
tbody tr:nth-child(even) {
    background: rgba(232, 248, 245, 0.4);
}

tbody tr:nth-child(odd) {
    background: rgba(180, 180, 245, 0.3);
}

/* Links */
a {
    color: #16a085;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    padding: 2px 0;
}

a:hover {
    color: #f39c12;
    text-shadow: 0 2px 8px rgba(22, 160, 133, 0.3);
}

a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #16a085, #f39c12);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* Error messages */
.error {
    color: #c0392b;
    background: linear-gradient(135deg, #fdedec 0%, #fadbd8 100%);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 12px;
    border-left: 4px solid #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.1);
    font-weight: 500;
}

.error strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: #922b21;
}

/* Loading animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #16a085;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
        border-radius: 12px;
    }
    
    h1 {
        font-size: 2.2rem;
        margin-bottom: 30px;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 12px 8px;
    }
    
    th {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 10px 6px;
    }
}

/* Scrollbar styling */
.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #e8f8f5;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #16a085, #f39c12);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #138d75, #e67e22);
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        background: white;
        padding: 20px;
    }
    
    .container::before {
        display: none;
    }
    
    thead tr {
        background: #e8f8f5 !important;
    }
    
    th {
        color: #16a085 !important;
    }
}