:root {
    --primary-color: #111827;
    --accent-color: #3b82f6;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #111827;
    --text-muted: #6b7280;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --card-border: rgba(229, 231, 235, 0.8);
    --hover-bg: #f9fafb;
    --border-color: #e5e7eb;
}

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

body {
    font-family: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 1rem;
    position: relative;
    overflow-x: hidden;
    background-image:
        radial-gradient(at 0% 0%, rgba(255, 255, 255, 0.8) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(255, 255, 255, 0.8) 0px, transparent 50%);
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 25s infinite ease-in-out;
}

.bg-orb-1 {
    width: 40vw;
    height: 40vw;
    background: rgba(229, 231, 235, 0.8);
    top: -10%;
    left: 20%;
    animation-delay: 0s;
}

.bg-orb-2 {
    width: 50vw;
    height: 50vw;
    background: rgba(209, 213, 219, 0.6);
    bottom: -5%;
    right: 10%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}

/* Navigation */
.top-nav {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 100;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-color);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.nav-link svg {
    width: 18px;
    height: 18px;
}

/* Layout */
.container {
    width: 100%;
    max-width: 900px;
    z-index: 10;
    margin-top: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

p.subtitle {
    color: var(--text-muted);
}

/* Controls */
.search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    justify-content: center;
}

.search-group {
    display: flex;
    flex: 1;
    min-width: 250px;
}

.search-container input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 12px 0 0 12px;
    outline: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.search-container input:focus {
    border-color: var(--accent-color);
    border-right: 1px solid var(--accent-color);
}

.search-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-btn:hover {
    background: #1f2937;
}

.clear-btn {
    padding: 12px 24px;
    background: #f3f4f6;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.clear-btn:hover {
    background: #e5e7eb;
}

/* Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    text-align: left;
}

th, td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

th {
    background: var(--hover-bg);
    color: var(--text-color);
    font-weight: 600;
    user-select: none;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

th:hover {
    background: #f3f4f6;
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: var(--hover-bg);
}

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

/* Sorting indicators */
th::after {
    margin-left: 6px;
    opacity: 0.3;
    font-size: 0.8rem;
}

th.sort-indicator::after {
    content: "↕";
    opacity: 0.5;
}

th.sort-asc::after {
    content: "↑";
    opacity: 1;
    color: var(--accent-color);
}

th.sort-desc::after {
    content: "↓";
    opacity: 1;
    color: var(--accent-color);
}

/* Footer count */
.table-footer {
    margin-top: 1rem;
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.table-footer span {
    font-weight: 700;
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .top-nav {
        top: 1rem;
        left: 1rem;
    }
    
    .card {
        padding: 1.5rem 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .search-group {
        width: 100%;
    }
    
    .clear-btn {
        width: 100%;
    }
}
