:root {
    --primary: linear-gradient(135deg, #8B5CF6, #EC4899);
    /* Vibrant purple to pink */
    --primary-dark: linear-gradient(135deg, #7C3AED, #DB2777);
    --secondary: linear-gradient(135deg, #3B82F6, #10B981);
    /* Blue to teal */
    --bg: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    --card: rgba(255, 255, 255, 0.95);
    --text: #1E293B;
    --text-light: #64748B;
    --border: rgba(148, 163, 184, 0.2);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.15);
}

body.dark {
    --primary: linear-gradient(135deg, #A78BFA, #F472B6);
    --primary-dark: linear-gradient(135deg, #8B5CF6, #EC4899);
    --secondary: linear-gradient(135deg, #60A5FA, #34D399);
    --bg: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --card: rgba(30, 41, 59, 0.9);
    --text: #F8FAFC;
    --text-light: #CBD5E1;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'SF Pro Display', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    padding: 30px 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HEADER */
.header {
    background: var(--card);
    backdrop-filter: blur(20px);
    padding: 25px 35px;
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* BACK BUTTON */
.back-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
    position: relative;
    overflow: hidden;
}

.back-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.6s;
}

.back-btn:hover::after {
    left: 100%;
}

.back-btn:hover {
    transform: translateX(-5px) translateY(-2px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
}

/* TITLE */
.title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

/* TOGGLE BUTTON */
.toggle-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25);
}

.toggle-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.4);
}

/* SEARCH CONTAINER */
.search-container {
    background: var(--card);
    backdrop-filter: blur(20px);
    padding: 25px 30px;
    border-radius: 24px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.search-form {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
}

.search-input {
    width: 100%;
    padding: 18px 60px 18px 55px;
    border: 2px solid transparent;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #8B5CF6;
    background: var(--card);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.clear-search {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s;
}

.clear-search:hover {
    color: #EF4444;
}

/* SEARCH BUTTON */
.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 35px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25);
    min-width: 140px;
    justify-content: center;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.4);
}

/* SEARCH INFO */
.search-info {
    color: var(--text-light);
    font-size: 15px;
    font-weight: 500;
    padding: 15px 5px 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-count {
    background: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

/* MAIN SECTION */
.main-section {
    background: var(--card);
    backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.results-info {
    color: var(--text-light);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* TABLE DESIGN */
.table-container {
    overflow-x: auto;
    margin-bottom: 35px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px;
}

table {
    width: 100%;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: var(--primary);
    color: white;
    padding: 22px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.8px;
    border: none;
    position: relative;
}

th:first-child {
    border-top-left-radius: 18px;
}

th:last-child {
    border-top-right-radius: 18px;
}

td {
    padding: 22px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    transition: all 0.3s ease;
}

tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

tbody tr:hover {
    background: rgba(139, 92, 246, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

tbody tr:hover td {
    color: var(--primary);
    border-bottom-color: rgba(139, 92, 246, 0.3);
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    background: var(--card);
    color: var(--text);
    border: 2px solid var(--border);
    padding: 14px 20px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 55px;
    height: 55px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-btn:hover:not(.active) {
    background: var(--primary);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 70px 20px;
}

.empty-state i {
    font-size: 80px;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    opacity: 0.8;
}

.empty-state p {
    font-size: 20px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 20px;
}

.back-to-all {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 16px 32px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
}

.back-to-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        text-align: center;
    }

    .header-left {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .search-form {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
        padding: 20px;
    }

    .main-section {
        padding: 20px;
    }

    .title {
        font-size: 26px;
        text-align: center;
    }

    .back-btn,
    .toggle-btn {
        width: 100%;
        justify-content: center;
    }

    table {
        min-width: 100%;
    }

    thead {
        display: none;
    }

    tr {
        display: flex;
        flex-direction: column;
        background: var(--card);
        padding: 20px;
        margin-bottom: 15px;
        border-radius: 20px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--border);
        transition: all 0.3s ease;
    }

    tr:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    }

    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 10px;
        border-bottom: 1px solid var(--border);
        font-size: 16px;
        font-weight: 600;
    }

    td:last-child {
        border-bottom: none;
    }

    td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--primary);
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .pagination {
        gap: 6px;
    }

    .page-btn {
        min-width: 45px;
        height: 45px;
        padding: 12px;
        font-size: 14px;
    }
}

/* ANIMATIONS */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.page-btn.active {
    animation: pulse 2s infinite;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7C3AED, #DB2777);
}