@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
    --primary-color: #fb7299;
    /* Bilibili Pink / Sakura */
    --primary-hover: #e85a85;
    --secondary-color: #23ade5;
    /* Hatsune Miku Blue */
    --text-color: #4c4948;
    --text-light: #7a7a7a;
    --glass-bg: rgba(255, 255, 255, 0.85);
    /* Whiter glass */
    --glass-border: 2px solid rgba(255, 255, 255, 0.9);
    --radius: 1.5rem;
    /* Rounder corners */
    --shadow-lg: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --font-heading: 'Ma Shan Zheng', cursive;
    /* Cute handwritten font for headings */
    --font-sans: 'Noto Sans SC', sans-serif;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    /* Anime sky background */
    background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
.nav-brand {
    font-family: var(--font-heading);
    color: #fb7299;
    letter-spacing: 1px;
}

h2 {
    font-size: 1.8rem;
}

p {
    color: var(--text-light);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(251, 114, 153, 0.3);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.container-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover {
    transform: translateY(-5px);
}

.card-max-sm {
    max-width: 420px;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.4rem;
    padding-left: 0.5rem;
}

input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 999px;
    /* Pill shape */
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    transition: all 0.3s;
    color: var(--text-color);
    font-family: var(--font-sans);
}

input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(35, 173, 229, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    font-size: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(45deg, #fb7299, #ff97b5);
    color: white;
    box-shadow: 0 6px 15px rgba(251, 114, 153, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px) rotate(1deg);
    box-shadow: 0 8px 20px rgba(251, 114, 153, 0.4);
}

.btn-secondary {
    background: white;
    color: #666;
    border: 2px solid #eee;
}

.btn-secondary:hover {
    background: #f0f7ff;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-danger {
    background: #ff7875;
    color: white;
}

.btn-danger:hover {
    background: #ff4d4f;
    transform: rotate(-2deg);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* Table */
.table-responsive {
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 2px solid rgba(251, 114, 153, 0.1);
}

th {
    font-weight: 700;
    color: #fb7299;
    text-transform: uppercase;
    background: rgba(255, 235, 240, 0.5);
    font-family: var(--font-sans);
}

tr:hover td {
    background: rgba(255, 240, 245, 0.6);
}

/* Badge */
.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.badge-active {
    background: #dff6dd;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.badge-disabled {
    background: #f5f5f5;
    color: #b8b8b8;
    border: 1px solid #d9d9d9;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.nav-brand {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 2px 2px 0px #fff;
}

/* Modal */
dialog {
    border: none;
    border-radius: var(--radius);
    padding: 0;
    margin: auto;
    background: transparent;
    max-width: 90vw;
}

dialog::backdrop {
    background: rgba(35, 173, 229, 0.2);
    backdrop-filter: blur(5px);
}

/* Animations */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    70% {
        transform: scale(1.02) translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-in {
    animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}