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

/* Root font size for fluid responsive scaling */
html {
    /* Fluid scaling from 14px @ 1280px to 24px @ 3840px */
    font-size: clamp(14px, 0.5vw + 12px, 24px);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
    min-height: 100vh;
    padding: 1.25rem;
    /* Changed from 20px to rem */
    color: #e2e8f0;
}

.container {
    max-width: 37.5rem;
    /* 600px -> rem */
    margin: 3.125rem auto;
    /* 50px -> rem */
}

.admin-container {
    max-width: 75rem;
    /* 1200px -> rem */
    margin: 0 auto;
}

.card {
    background: #111827;
    border-radius: 0.75rem;
    /* 12px -> rem */
    padding: 1.875rem;
    /* 30px -> rem */
    box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.3);
    /* 10px 40px -> rem */
    margin-bottom: 1.25rem;
    /* 20px -> rem */
    border: 1px solid #1f2937;
}

h1 {
    color: #f8fafc;
    margin-bottom: 0.625rem;
    /* 10px -> rem */
    font-size: 1.75rem;
    /* 28px -> rem */
}

h2 {
    color: #e2e8f0;
    margin-bottom: 1.25rem;
    /* 20px -> rem */
    font-size: 1.375rem;
    /* 22px -> rem */
}

.subtitle {
    color: #94a3b8;
    margin-bottom: 1.875rem;
    /* 30px -> rem */
}

.form-group {
    margin-bottom: 1.25rem;
    /* 20px -> rem */
}

label {
    display: block;
    margin-bottom: 0.5rem;
    /* 8px -> rem */
    color: #cbd5e1;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem 0.9375rem;
    /* 12px 15px -> rem */
    border: 2px solid #334155;
    border-radius: 0.5rem;
    /* 8px -> rem */
    font-size: 1rem;
    /* 16px -> rem, will scale with root */
    transition: border-color 0.3s;
    background: #0b1220;
    color: #e2e8f0;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

small {
    color: #94a3b8;
    font-size: 13px;
}

.btn {
    padding: 0.75rem 1.5rem;
    /* 12px 24px -> rem */
    border: none;
    border-radius: 0.5rem;
    /* 8px -> rem */
    font-size: 1rem;
    /* 16px -> rem */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    /* 6px 12px -> rem */
    font-size: 0.875rem;
    /* 14px -> rem */
    width: auto;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    /* 6px 12px -> rem */
    font-size: 0.8125rem;
    /* 13px -> rem */
    margin-left: 0.5rem;
    /* 8px -> rem */
    width: auto;
}

.message {
    padding: 0.9375rem;
    /* 15px -> rem */
    border-radius: 0.5rem;
    /* 8px -> rem */
    margin-top: 1.25rem;
    /* 20px -> rem */
    font-weight: 500;
}

.message.success {
    background: #064e3b;
    color: #d1fae5;
    border: 1px solid #065f46;
}

.message.error {
    background: #3f1d1d;
    color: #fee2e2;
    border: 1px solid #7f1d1d;
}

.footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    opacity: 0.9;
}

/* 管理員後臺樣式 */
.admin-header {
    background: #111827;
    padding: 1.25rem 1.875rem;
    /* 20px 30px -> rem */
    border-radius: 0.75rem;
    /* 12px -> rem */
    margin-bottom: 1.25rem;
    /* 20px -> rem */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0.3125rem 1.25rem rgba(0, 0, 0, 0.3);
    /* 5px 20px -> rem */
    border: 1px solid #1f2937;
}

.admin-header h1 {
    margin: 0;
}

.admin-header .btn {
    width: auto;
}

.admin-content {
    display: grid;
    gap: 20px;
}

.team-item {
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.team-header h3 {
    margin: 0;
    color: #e2e8f0;
}

.badge {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.team-info {
    background: #0b1220;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.team-info p {
    margin: 8px 0;
    color: #cbd5e1;
}

code {
    background: #0f172a;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #f472b6;
    border: 1px solid #1f2937;
}

.keys-section {
    margin: 20px 0;
}

.keys-section h4 {
    margin-bottom: 12px;
    color: #cbd5e1;
}

.key-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #0b1220;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #1f2937;
}

.key-item.used {
    background: #111827;
    opacity: 0.7;
}

.key-number {
    font-weight: 600;
    color: #93c5fd;
    margin-right: 10px;
    min-width: 30px;
}

.key-code {
    flex: 1;
    font-size: 12px;
    word-break: break-all;
}

.key-status {
    color: #34d399;
    font-size: 13px;
    margin-left: 10px;
}

.team-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.team-actions .btn {
    width: auto;
    flex: 1;
}

.invitations-table {
    width: 100%;
    border-collapse: collapse;
}

.invitations-table th,
.invitations-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.invitations-table th {
    background: #0b1220;
    font-weight: 600;
    color: #cbd5e1;
}

.invitations-table td {
    color: #e2e8f0;
}

.status-success {
    color: #28a745;
}

.status-failed {
    color: #dc3545;
}

.empty {
    text-align: center;
    color: #94a3b8;
    padding: 40px;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
    }

    .admin-header .btn {
        width: 100%;
    }

    .team-actions {
        flex-direction: column;
    }
}

/* 自動踢人配置樣式 */
.status-success {
    color: #10b981;
    font-weight: 500;
}

.status-failed {
    color: #ef4444;
    font-weight: 500;
}

input[type="time"] {
    padding: 10px;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 14px;
    background: #0b1220;
    color: #e2e8f0;
}

/* 自定義 Checkbox 樣式 */
.checkbox-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0;
}

/* 覆蓋 form-group 對 checkbox-row 的影響 */
.form-group.checkbox-row {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Align checkbox with input field in key generation form */
#createKeyForm .checkbox-row {
    margin-top: 29px;
}

/* Auto Kick 表单的勾选框添加上边距 */
#autoKickConfigForm .checkbox-row {
    margin-top: 20px;
}

.check-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #cbd5e1;
    font-weight: 500;
    transition: color 0.3s ease;
}

.check-label:hover {
    color: #f8fafc;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 10px;
    border: 2px solid #475569;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    vertical-align: middle;
}

input[type="checkbox"]:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2),
        0 4px 12px rgba(102, 126, 234, 0.4);
}

input[type="checkbox"]:checked::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -40%) rotate(45deg);
    opacity: 1;
    animation: checkmark-appear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkmark-appear {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%) rotate(45deg) scale(0);
    }

    50% {
        transform: translate(-50%, -40%) rotate(45deg) scale(1.2);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -40%) rotate(45deg) scale(1);
    }
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
}

input[type="checkbox"]:active {
    transform: scale(0.95);
}

input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input[type="checkbox"]:disabled:hover {
    border-color: #475569;
    background: rgba(15, 23, 42, 0.6);
    box-shadow: none;
}

/* Auto Kick 状态横幅 */
.auto-kick-status-banner {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border: 2px solid #ff4757;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(255, 75, 87, 0.4);
    animation: pulseGlow 2s ease-in-out infinite;
    z-index: 100;
    max-width: 280px;
    overflow: hidden;
}

.auto-kick-status-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(255, 75, 87, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(255, 75, 87, 0.6), 0 0 40px rgba(255, 75, 87, 0.3);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.status-banner-icon {
    font-size: 24px;
    line-height: 1;
    animation: bounce 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    flex-shrink: 0;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.status-banner-content {
    flex: 1;
    color: white;
}

.status-banner-content strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-banner-content p {
    margin: 0;
    font-size: 11px;
    opacity: 0.95;
    line-height: 1.3;
}

/* 确保面板有相对定位，以便横幅绝对定位 */
.modal-panel {
    position: relative;
}

/* 彈窗樣式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #111827;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid #1f2937;
    color: #e2e8f0;
}

.close {
    color: #94a3b8;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #f8fafc;
}

/* Teams 網格佈局 */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.team-card {
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 20px;
    background: #0b1220;
    transition: all 0.3s;
}

.team-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1f2937;
}

.team-header h3 {
    margin: 0;
    color: #e2e8f0;
    font-size: 18px;
}

.team-info {
    margin-bottom: 15px;
}

.team-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #cbd5e1;
}

.team-info code {
    background: #111827;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #f472b6;
    border: 1px solid #334155;
}

.team-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 徽章樣式 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #334155;
    color: #e2e8f0;
}

.badge-owner {
    background: #ffd700;
    color: #333;
}

.badge-temp {
    background: #ff9800;
    color: white;
}

.badge-temp-confirmed {
    background: #ef4444;
    color: white;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-error {
    background: #ef4444;
    color: white;
}

/* 成員列表 */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #0b1220;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 5px;
}

.member-meta small {
    color: #94a3b8;
    font-size: 12px;
}

/* 邀請碼列表 */
.keys-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.key-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #0b1220;
    gap: 10px;
}

.key-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.key-code {
    background: #111827;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #f472b6;
    border: 1px solid #334155;
}

.key-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 日誌表格 */
.log-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.log-table th,
.log-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.log-table th {
    background: #0b1220;
    font-weight: 600;
    color: #cbd5e1;
    font-size: 14px;
}

.log-table td {
    font-size: 13px;
    color: #e2e8f0;
}

.log-table tr:hover {
    background: #111827;
}

.log-cell-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    justify-content: center;
}

.log-cell-actions {
    display: flex;
    align-items: center;
    min-height: 32px;
}

.log-cell-actions .btn {
    white-space: nowrap;
    font-size: 10px;
    padding: 4px 10px;
    min-width: auto;
    height: auto;
    line-height: 1.2;
}

.badge-success-outline {
    background: transparent;
    color: #10b981;
    border: 1px solid #10b981;
    white-space: nowrap;
}

.log-table td {
    vertical-align: middle;
}

/* Fixed column widths for stability */
.log-table th:nth-child(1),
.log-table td:nth-child(1) {
    width: 155px;
}

/* Time */
.log-table th:nth-child(4),
.log-table td:nth-child(4) {
    width: 100px;
}

/* Type */
.log-table th:nth-child(5),
.log-table td:nth-child(5) {
    width: 155px;
}

/* Expire */
.log-table th:nth-child(6),
.log-table td:nth-child(6) {
    width: 80px;
}

/* Status */
.log-table th:nth-child(7),
.log-table td:nth-child(7) {
    width: 100px;
    /* Action column - increased width for button */
    min-width: 180px;
}

/* 響應式 */
@media (max-width: 768px) {
    .teams-grid {
        grid-template-columns: 1fr;
    }

    .team-actions {
        flex-direction: column;
    }

    .team-actions .btn {
        width: 100%;
    }

    .member-item,
    .key-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

/* Admin login studio style */
.admin-login {
    --admin-primary: #6366f1;
    --admin-primary-glow: rgba(99, 102, 241, 0.6);
    --admin-accent: #00f2ff;
    --admin-danger: #f43f5e;
    /* Added danger variable */
    --admin-bg-dark: #020617;
    --admin-glass: rgba(15, 23, 42, 0.75);
    --admin-glass-border: rgba(255, 255, 255, 0.12);
    --admin-text-main: #f8fafc;
    --admin-text-dim: #94a3b8;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--admin-bg-dark);
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--admin-text-main);
    position: relative;
}

.admin-login .bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    overflow: hidden;
}

/* Stars */
.admin-login .blob {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow:
        0 0 2px rgba(255, 255, 255, 0.5),
        0 0 4px rgba(255, 255, 255, 0.3);
    animation: twinkle 3s infinite;
}

/* Positioning for 20 stars with varied sizes */
.admin-login .blob:nth-child(1) {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.admin-login .blob:nth-child(2) {
    top: 20%;
    left: 80%;
    animation-delay: 0.5s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(3) {
    top: 35%;
    left: 25%;
    animation-delay: 1s;
}

.admin-login .blob:nth-child(4) {
    top: 15%;
    left: 60%;
    animation-delay: 1.5s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(5) {
    top: 45%;
    left: 90%;
    animation-delay: 2s;
}

.admin-login .blob:nth-child(6) {
    top: 60%;
    left: 40%;
    animation-delay: 2.5s;
}

.admin-login .blob:nth-child(7) {
    top: 25%;
    left: 45%;
    animation-delay: 0.3s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(8) {
    top: 70%;
    left: 15%;
    animation-delay: 0.8s;
}

.admin-login .blob:nth-child(9) {
    top: 5%;
    left: 35%;
    animation-delay: 1.2s;
}

.admin-login .blob:nth-child(10) {
    top: 50%;
    left: 70%;
    animation-delay: 1.7s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(11) {
    top: 80%;
    left: 55%;
    animation-delay: 2.2s;
}

.admin-login .blob:nth-child(12) {
    top: 30%;
    left: 5%;
    animation-delay: 0.6s;
}

.admin-login .blob:nth-child(13) {
    top: 65%;
    left: 85%;
    animation-delay: 1.1s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(14) {
    top: 40%;
    left: 95%;
    animation-delay: 1.6s;
}

.admin-login .blob:nth-child(15) {
    top: 85%;
    left: 30%;
    animation-delay: 2.1s;
}

.admin-login .blob:nth-child(16) {
    top: 12%;
    left: 75%;
    animation-delay: 0.4s;
}

.admin-login .blob:nth-child(17) {
    top: 55%;
    left: 50%;
    animation-delay: 0.9s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(18) {
    top: 75%;
    left: 65%;
    animation-delay: 1.4s;
}

.admin-login .blob:nth-child(19) {
    top: 90%;
    left: 10%;
    animation-delay: 1.9s;
}

.admin-login .blob:nth-child(20) {
    top: 8%;
    left: 88%;
    animation-delay: 2.4s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(21) {
    top: 22%;
    left: 92%;
    animation-delay: 0.7s;
}

.admin-login .blob:nth-child(22) {
    top: 48%;
    left: 12%;
    animation-delay: 1.3s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(23) {
    top: 62%;
    left: 78%;
    animation-delay: 1.8s;
}

.admin-login .blob:nth-child(24) {
    top: 88%;
    left: 45%;
    animation-delay: 2.3s;
}

.admin-login .blob:nth-child(25) {
    top: 18%;
    left: 28%;
    animation-delay: 0.5s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(26) {
    top: 38%;
    left: 82%;
    animation-delay: 1.0s;
}

.admin-login .blob:nth-child(27) {
    top: 72%;
    left: 8%;
    animation-delay: 1.5s;
}

.admin-login .blob:nth-child(28) {
    top: 92%;
    left: 68%;
    animation-delay: 2.0s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(29) {
    top: 14%;
    left: 52%;
    animation-delay: 0.9s;
}

.admin-login .blob:nth-child(30) {
    top: 42%;
    left: 18%;
    animation-delay: 1.4s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(31) {
    top: 58%;
    left: 62%;
    animation-delay: 1.9s;
}

.admin-login .blob:nth-child(32) {
    top: 78%;
    left: 38%;
    animation-delay: 2.4s;
}

.admin-login .blob:nth-child(33) {
    top: 26%;
    left: 72%;
    animation-delay: 0.6s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(34) {
    top: 52%;
    left: 32%;
    animation-delay: 1.1s;
}

.admin-login .blob:nth-child(35) {
    top: 68%;
    left: 88%;
    animation-delay: 1.6s;
}

.admin-login .blob:nth-child(36) {
    top: 82%;
    left: 22%;
    animation-delay: 2.1s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(37) {
    top: 16%;
    left: 42%;
    animation-delay: 0.8s;
}

.admin-login .blob:nth-child(38) {
    top: 46%;
    left: 58%;
    animation-delay: 1.3s;
    width: 3px;
    height: 3px;
}

.admin-login .blob:nth-child(39) {
    top: 66%;
    left: 28%;
    animation-delay: 1.8s;
}

.admin-login .blob:nth-child(40) {
    top: 94%;
    left: 82%;
    animation-delay: 2.3s;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Additional stars */
.admin-login .bg-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 90%, white, transparent);
    background-size: 200% 200%;
    animation: starsMove 120s linear infinite;
    opacity: 0.6;
}

@keyframes starsMove {
    from {
        background-position: 0% 0%;
    }

    to {
        background-position: 100% 100%;
    }
}

/* Shooting Stars */
.admin-login .bg-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
}

/* Shooting Stars */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 4px 2px rgba(255, 255, 255, 0.8);
    animation: shootingStar 3s linear infinite;
    opacity: 0;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 0;
    right: 2px;
    height: 2px;
    width: 80px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 0;
    right: 2px;
    height: 2px;
    width: 80px;
    background: linear-gradient(to right, rgba(135, 206, 250, 0.6), transparent);
    filter: blur(1px);
}

.shooting-star:nth-child(4) {
    top: 10%;
    right: 20%;
    animation-delay: 0s;
    animation-duration: 2.5s;
}

.shooting-star:nth-child(5) {
    top: 30%;
    right: 60%;
    animation-delay: 4s;
    animation-duration: 3s;
}

.shooting-star:nth-child(6) {
    top: 50%;
    right: 10%;
    animation-delay: 7s;
    animation-duration: 2.8s;
}

@keyframes shootingStar {
    0% {
        transform: translateX(0) translateY(0) rotate(-45deg);
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    95% {
        opacity: 1;
    }

    100% {
        transform: translateX(-300px) translateY(300px) rotate(-45deg);
        opacity: 0;
    }
}

.admin-login .login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: clamp(24px, 1.5vw, 38px);
    padding: clamp(40px, 3vw, 64px) clamp(32px, 2.5vw, 52px);
    width: 100%;
    max-width: clamp(380px, 25vw, 540px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
    animation: adminCardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.admin-login .login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 70%);
    animation: liquidMove 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes liquidMove {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

@keyframes adminCardAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-login .header {
    text-align: center;
    margin-bottom: 40px;
}

.admin-login .icon-box {
    width: clamp(56px, 4vw, 80px);
    height: clamp(56px, 4vw, 80px);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: clamp(16px, 1.2vw, 22px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(18px, 1.5vw, 26px);
    font-size: clamp(12px, 0.85vw, 16px);
    letter-spacing: clamp(0.8px, 0.08vw, 1.3px);
    box-shadow:
        0 8px 20px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.admin-login .icon-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transform: rotate(45deg);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.admin-login h1 {
    font-size: clamp(20px, 1.4vw, 28px);
    font-weight: 700;
    letter-spacing: clamp(2.5px, 0.2vw, 4px);
    text-transform: uppercase;
    margin-bottom: clamp(7px, 0.5vw, 10px);
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-login .subtitle {
    font-size: clamp(12px, 0.85vw, 16px);
    color: var(--admin-text-dim);
    letter-spacing: clamp(0.8px, 0.08vw, 1.3px);
}

.admin-login .form-group {
    margin-bottom: 35px;
    position: relative;
}

.admin-login label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--admin-primary);
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.admin-login .input-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-login input[type="password"],
.admin-login input[type="text"],
.admin-login input[type="email"] {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: clamp(10px, 0.8vw, 15px);
    padding: clamp(12px, 1vw, 18px) clamp(14px, 1.2vw, 20px);
    color: #fff;
    font-size: clamp(15px, 1.1vw, 19px);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-login input[type="password"]:focus,
.admin-login input[type="text"]:focus,
.admin-login input[type="email"]:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.admin-login input[type="password"]::placeholder,
.admin-login input[type="text"]::placeholder,
.admin-login input[type="email"]::placeholder {
    color: #64748b;
    letter-spacing: 1px;
}

.admin-login .input-focus-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--admin-primary), var(--admin-accent));
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px var(--admin-primary-glow);
}

.admin-login input[type="password"]:focus~.input-focus-line,
.admin-login input[type="text"]:focus~.input-focus-line,
.admin-login input[type="email"]:focus~.input-focus-line {
    width: 100%;
}

/* Input Icons - Now outside the input */
.admin-login .input-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    color: #64748b;
    transition: all 0.3s;
    flex-shrink: 0;
}

.admin-login .input-container.with-icon input:focus~.input-icon,
.admin-login .input-container.with-icon:focus-within .input-icon {
    color: var(--admin-primary);
}

.admin-login .submit-btn {
    width: 100%;
    padding: clamp(14px, 1.2vw, 20px);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8) 0%, rgba(79, 70, 229, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: clamp(14px, 1vw, 20px);
    color: white;
    font-size: clamp(14px, 1vw, 18px);
    font-weight: 700;
    letter-spacing: clamp(1.8px, 0.15vw, 2.5px);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow:
        0 8px 20px rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.admin-login .submit-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.3) 0%,
            transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.admin-login .submit-btn:hover::before {
    opacity: 1;
    animation: liquidMove 3s ease-in-out infinite;
}

.admin-login .submit-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 1) 0%, rgba(79, 70, 229, 1) 100%);
    box-shadow:
        0 12px 30px rgba(99, 102, 241, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}

.admin-login .submit-btn:active {
    transform: translateY(1px);
}

.admin-login .submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
    transform: none;
}

.admin-login .submit-btn.success {
    background: #10b981;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
}

.admin-login .loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    display: none;
    animation: adminSpin 0.8s linear infinite;
}

@keyframes adminSpin {
    to {
        transform: rotate(360deg);
    }
}

.admin-login .message {
    margin-top: 25px;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    display: none;
    animation: adminFadeIn 0.4s ease;
}

.admin-login .message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

@keyframes adminFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.admin-login .footer-info {
    position: absolute;
    bottom: 30px;
    width: 100%;
    text-align: center;
    font-size: 11px;
    color: #475569;
    letter-spacing: 2px;
}

.admin-login .status-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px #10b981;
    animation: adminPulse 2s infinite;
}

@keyframes adminPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.admin-login .error-shake {
    animation: adminShake 0.4s ease;
}

@keyframes adminShake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-4px);
    }

    100% {
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    .admin-login {
        padding: 24px 16px;
    }

    .admin-login .login-card {
        padding: 36px 26px;
    }

    .admin-login h1 {
        font-size: 20px;
        letter-spacing: 2px;
    }

    .admin-login .icon-box {
        width: 56px;
        height: 56px;
        font-size: 12px;
    }

    .admin-login input[type="password"] {
        font-size: 16px;
    }

    .admin-login .footer-info {
        font-size: 10px;
        bottom: 18px;
    }

    /* Remove the incorrect blob styling that was causing white fog on small screens */
}

@media (max-width: 420px) {
    .admin-login .login-card {
        padding: 30px 22px;
    }

    .admin-login .submit-btn {
        font-size: 14px;
        padding: 14px;
    }
}

/* Help Button Styles */
.admin-login .help-btn {
    position: absolute;
    top: clamp(18px, 1.5vw, 26px);
    right: clamp(18px, 1.5vw, 26px);
    width: clamp(38px, 3vw, 52px);
    height: clamp(38px, 3vw, 52px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--admin-glass-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--admin-text-dim);
    z-index: 10;
}

.admin-login .help-btn svg {
    width: clamp(22px, 1.8vw, 30px);
    height: clamp(22px, 1.8vw, 30px);
}

.admin-login .help-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--admin-primary);
    color: var(--admin-primary);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.admin-login .help-btn svg {
    width: 24px;
    height: 24px;
}

/* Instructions Modal Styles */
.instructions-content {
    max-width: clamp(500px, 35vw, 780px) !important;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: none;
    padding: clamp(32px, 2.5vw, 44px) !important;
}

.instructions-content .modal-header h3 {
    font-size: clamp(18px, 1.4vw, 24px) !important;
}

.instruction-section h4 {
    font-size: clamp(15px, 1.1vw, 19px) !important;
}

.instruction-section {
    font-size: clamp(14px, 1vw, 16px) !important;
}

.instruction-section li,
.instruction-section p {
    font-size: clamp(13px, 0.95vw, 15px) !important;
    line-height: clamp(1.7, 0.015vw + 1.68, 2) !important;
}

.instructions-content::-webkit-scrollbar {
    display: none;
}

.instructions-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--admin-glass-border);
    gap: 15px;
}

.instructions-content .modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #f8fafc;
    flex: 1;
}

/* Countdown Timer */
.countdown-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    border: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    animation: countdownPulse 1s ease-in-out infinite;
}

.countdown-icon {
    font-size: 20px;
    animation: timerRotate 2s linear infinite;
}

.countdown-text {
    font-size: 14px;
    font-weight: 600;
    color: #fca5a5;
    white-space: nowrap;
}

#countdownSeconds {
    display: inline-block;
    min-width: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #ef4444;
    text-align: center;
}

@keyframes countdownPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

@keyframes timerRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.instructions-content .close-modal {
    background: transparent;
    border: none;
    color: var(--admin-text-dim);
    font-size: 32px;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instructions-content .close-modal:hover {
    color: #f8fafc;
    transform: rotate(90deg);
}

.instructions-body {
    color: #e2e8f0;
}

.instruction-section {
    margin-bottom: 25px;
}

.instruction-section h4 {
    color: var(--admin-primary);
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.instruction-section ol,
.instruction-section ul {
    margin-left: 20px;
    line-height: 1.8;
}

.instruction-section li {
    margin-bottom: 8px;
    color: #cbd5e1;
}

.instruction-section strong {
    color: #f8fafc;
    font-weight: 600;
}

.instruction-section p {
    line-height: 1.8;
    color: #cbd5e1;
}

/* Workspace steps nested list */
.workspace-steps {
    margin-top: 10px;
    margin-left: 20px;
    list-style: none;
    padding-left: 0;
}

.workspace-steps li {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--admin-primary);
    border-radius: 6px;
    color: #e2e8f0;
}

.workspace-steps li strong {
    color: var(--admin-primary);
}

/* Responsive adjustments for help button */
@media (max-width: 640px) {
    .admin-login .help-btn {
        width: 36px;
        height: 36px;
        top: 15px;
        right: 15px;
    }

    .admin-login .help-btn svg {
        width: 20px;
        height: 20px;
    }

    .instructions-content {
        max-height: 90vh;
        padding: 20px;
    }

    .instructions-content .modal-header h3 {
        font-size: 18px;
    }

    .instruction-section h4 {
        font-size: 15px;
    }
}

/* Mandatory Modal Styles */
.mandatory-modal {
    z-index: 10000 !important;
    background: rgba(2, 6, 23, 0.95) !important;
}

.mandatory-modal .dialog-content {
    pointer-events: all;
}

.mandatory-modal.mandatory .close-modal {
    display: none !important;
}

/* Instructions Footer */
.instructions-footer {
    padding: 20px;
    border-top: 1px solid var(--admin-glass-border);
    background: rgba(2, 6, 23, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.confirm-btn {
    width: 100%;
    max-width: clamp(350px, 28vw, 520px);
    padding: clamp(14px, 1.2vw, 20px) clamp(20px, 1.8vw, 30px);
    background: rgba(148, 163, 184, 0.3);
    border: 2px solid rgba(148, 163, 184, 0.5);
    border-radius: clamp(10px, 0.8vw, 15px);
    color: #94a3b8;
    font-size: clamp(15px, 1.1vw, 19px);
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.confirm-btn .btn-icon {
    font-size: 20px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.confirm-btn.enabled {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: white;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.confirm-btn.enabled .btn-icon {
    opacity: 1;
    animation: checkPulse 1.5s ease-in-out infinite;
}

.confirm-btn.enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.confirm-btn.enabled:active {
    transform: translateY(0);
}

@keyframes checkPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.scroll-hint {
    margin: 0;
    font-size: 13px;
    color: #f59e0b;
    text-align: center;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Adjust instructions body to hide scrollbar */
.instructions-body {
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: none;
}

/* Hide scrollbar for instructions */
.instructions-body::-webkit-scrollbar {
    display: none;
}

/* Contact Links Styles */
.contact-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    cursor: pointer;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.2) 0%,
            transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.contact-btn:hover::before {
    opacity: 1;
    animation: liquidMove 3s ease-in-out infinite;
}

.contact-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* LINE Button */
.line-btn {
    background: linear-gradient(135deg, rgba(6, 199, 85, 0.9) 0%, rgba(5, 179, 76, 0.95) 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 4px 15px rgba(6, 199, 85, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.line-btn:hover {
    background: linear-gradient(135deg, rgba(6, 199, 85, 1) 0%, rgba(5, 179, 76, 1) 100%);
    box-shadow:
        0 8px 25px rgba(6, 199, 85, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

/* Responsive contact buttons */
@media (max-width: 640px) {
    .contact-links {
        flex-direction: column;
    }

    .contact-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Admin dashboard studio layout with Liquid Glass Morphism */
.admin-dashboard {
    --admin-primary: #6366f1;
    --admin-primary-glow: rgba(99, 102, 241, 0.35);
    --admin-accent: #00f2ff;
    --admin-danger: #f43f5e;
    --admin-bg-dark: #020617;
    --admin-glass: rgba(15, 23, 42, 0.4);
    --admin-glass-border: rgba(255, 255, 255, 0.15);
    --admin-text-dim: #94a3b8;
    --liquid-glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    --liquid-shimmer: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
    background: var(--admin-bg-dark);
    color: #e2e8f0;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    animation: fadeInDashboard 0.8s ease-out;
}

@keyframes fadeInDashboard {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Custom Scrollbar */
.admin-dashboard *::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.admin-dashboard *::-webkit-scrollbar-track {
    background: transparent;
}

.admin-dashboard *::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid transparent;
    background-clip: content-box;
}

.admin-dashboard *::-webkit-scrollbar-thumb:hover {
    background: var(--admin-primary);
    box-shadow: 0 0 8px var(--admin-primary-glow);
}

.admin-dashboard .bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    overflow: hidden;
}

/* Stars */
.admin-dashboard .blob {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow:
        0 0 2px rgba(255, 255, 255, 0.5),
        0 0 4px rgba(255, 255, 255, 0.3);
    animation: twinkle 3s infinite;
}

/* Positioning for 40 stars with varied sizes */
.admin-dashboard .blob:nth-child(1) {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.admin-dashboard .blob:nth-child(2) {
    top: 20%;
    left: 80%;
    animation-delay: 0.5s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(3) {
    top: 35%;
    left: 25%;
    animation-delay: 1s;
}

.admin-dashboard .blob:nth-child(4) {
    top: 15%;
    left: 60%;
    animation-delay: 1.5s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(5) {
    top: 45%;
    left: 90%;
    animation-delay: 2s;
}

.admin-dashboard .blob:nth-child(6) {
    top: 60%;
    left: 40%;
    animation-delay: 2.5s;
}

.admin-dashboard .blob:nth-child(7) {
    top: 25%;
    left: 45%;
    animation-delay: 0.3s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(8) {
    top: 70%;
    left: 15%;
    animation-delay: 0.8s;
}

.admin-dashboard .blob:nth-child(9) {
    top: 5%;
    left: 35%;
    animation-delay: 1.2s;
}

.admin-dashboard .blob:nth-child(10) {
    top: 50%;
    left: 70%;
    animation-delay: 1.7s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(11) {
    top: 80%;
    left: 55%;
    animation-delay: 2.2s;
}

.admin-dashboard .blob:nth-child(12) {
    top: 30%;
    left: 5%;
    animation-delay: 0.6s;
}

.admin-dashboard .blob:nth-child(13) {
    top: 65%;
    left: 85%;
    animation-delay: 1.1s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(14) {
    top: 40%;
    left: 95%;
    animation-delay: 1.6s;
}

.admin-dashboard .blob:nth-child(15) {
    top: 85%;
    left: 30%;
    animation-delay: 2.1s;
}

.admin-dashboard .blob:nth-child(16) {
    top: 12%;
    left: 75%;
    animation-delay: 0.4s;
}

.admin-dashboard .blob:nth-child(17) {
    top: 55%;
    left: 50%;
    animation-delay: 0.9s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(18) {
    top: 75%;
    left: 65%;
    animation-delay: 1.4s;
}

.admin-dashboard .blob:nth-child(19) {
    top: 90%;
    left: 10%;
    animation-delay: 1.9s;
}

.admin-dashboard .blob:nth-child(20) {
    top: 8%;
    left: 88%;
    animation-delay: 2.4s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(21) {
    top: 22%;
    left: 92%;
    animation-delay: 0.7s;
}

.admin-dashboard .blob:nth-child(22) {
    top: 48%;
    left: 12%;
    animation-delay: 1.3s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(23) {
    top: 62%;
    left: 78%;
    animation-delay: 1.8s;
}

.admin-dashboard .blob:nth-child(24) {
    top: 88%;
    left: 45%;
    animation-delay: 2.3s;
}

.admin-dashboard .blob:nth-child(25) {
    top: 18%;
    left: 28%;
    animation-delay: 0.5s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(26) {
    top: 38%;
    left: 82%;
    animation-delay: 1.0s;
}

.admin-dashboard .blob:nth-child(27) {
    top: 72%;
    left: 8%;
    animation-delay: 1.5s;
}

.admin-dashboard .blob:nth-child(28) {
    top: 92%;
    left: 68%;
    animation-delay: 2.0s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(29) {
    top: 14%;
    left: 52%;
    animation-delay: 0.9s;
}

.admin-dashboard .blob:nth-child(30) {
    top: 42%;
    left: 18%;
    animation-delay: 1.4s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(31) {
    top: 58%;
    left: 62%;
    animation-delay: 1.9s;
}

.admin-dashboard .blob:nth-child(32) {
    top: 78%;
    left: 38%;
    animation-delay: 2.4s;
}

.admin-dashboard .blob:nth-child(33) {
    top: 26%;
    left: 72%;
    animation-delay: 0.6s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(34) {
    top: 52%;
    left: 32%;
    animation-delay: 1.1s;
}

.admin-dashboard .blob:nth-child(35) {
    top: 68%;
    left: 88%;
    animation-delay: 1.6s;
}

.admin-dashboard .blob:nth-child(36) {
    top: 82%;
    left: 22%;
    animation-delay: 2.1s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(37) {
    top: 16%;
    left: 42%;
    animation-delay: 0.8s;
}

.admin-dashboard .blob:nth-child(38) {
    top: 46%;
    left: 58%;
    animation-delay: 1.3s;
    width: 3px;
    height: 3px;
}

.admin-dashboard .blob:nth-child(39) {
    top: 66%;
    left: 28%;
    animation-delay: 1.8s;
}

.admin-dashboard .blob:nth-child(40) {
    top: 94%;
    left: 82%;
    animation-delay: 2.3s;
}

/* Additional stars */
.admin-dashboard .bg-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 90%, white, transparent);
    background-size: 200% 200%;
    animation: starsMove 120s linear infinite;
    opacity: 0.6;
}

@keyframes starsMove {
    from {
        background-position: 0% 0%;
    }

    to {
        background-position: 100% 100%;
    }
}

/* Shooting Stars */
.admin-dashboard .shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 4px 2px rgba(255, 255, 255, 0.8);
    animation: shootingStar 3s linear infinite;
    opacity: 0;
}

.admin-dashboard .shooting-star::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2px;
    height: 2px;
    width: 80px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.8), transparent);
}

.admin-dashboard .shooting-star::after {
    content: '';
    position: absolute;
    top: 0;
    left: 2px;
    height: 2px;
    width: 80px;
    background: linear-gradient(to left, rgba(135, 206, 250, 0.6), transparent);
    filter: blur(1px);
}

.admin-dashboard .shooting-star:nth-child(41) {
    top: 10%;
    right: 20%;
    animation-delay: 0s;
    animation-duration: 2.5s;
}

.admin-dashboard .shooting-star:nth-child(42) {
    top: 30%;
    right: 60%;
    animation-delay: 4s;
    animation-duration: 3s;
}

.admin-dashboard .shooting-star:nth-child(43) {
    top: 50%;
    right: 10%;
    animation-delay: 7s;
    animation-duration: 2.8s;
}

@keyframes shootingStar {
    0% {
        transform: translateX(0) translateY(0) rotate(-45deg);
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    95% {
        opacity: 1;
    }

    100% {
        transform: translateX(-300px) translateY(300px) rotate(-45deg);
        opacity: 0;
    }
}

.admin-dashboard .system-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0;
    padding: 10px 24px;
    padding-right: 110px;
    /* Add padding to prevent overlap with action hub */
    background: var(--liquid-glass-bg);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-bottom: 1px solid var(--admin-glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 70px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.admin-dashboard .system-header {
    padding-right: clamp(90px, 7vw, 160px);
}

.admin-dashboard .system-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--liquid-shimmer);
    animation: headerShimmer 8s linear infinite;
}

@keyframes headerShimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.admin-dashboard .status-overview {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
    justify-self: start;
}

.admin-dashboard .stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-dashboard .stat-label {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--admin-text-dim);
    text-transform: uppercase;
}

.admin-dashboard .stat-value {
    font-size: 16px;
    font-weight: 700;
    font-family: "JetBrains Mono", "Courier New", monospace;
}

.admin-dashboard .value-active {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.admin-dashboard .value-expired {
    color: var(--admin-danger);
    text-shadow: 0 0 10px rgba(244, 63, 94, 0.35);
}

.admin-dashboard .value-neutral {
    color: #e2e8f0;
    font-size: 12px;
    letter-spacing: 1px;
    margin-top: 4px;
    text-transform: uppercase;
}

.admin-dashboard .center-brand {
    text-align: center;
    justify-self: center;
}

.admin-dashboard .center-brand h1 {
    font-size: 22px;
    letter-spacing: 4px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(to right, #ffffff, var(--admin-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.admin-dashboard .header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    justify-self: end;
}

.admin-dashboard .slots-column {
    text-align: left;
}

.admin-dashboard .center-brand .subtitle {
    font-size: 11px;
    color: var(--admin-text-dim);
    letter-spacing: 2px;
    margin-top: 6px;
}

.admin-dashboard .current-time-box {
    justify-self: end;
    background: var(--admin-glass);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--admin-glass-border);
    color: var(--admin-accent);
    font-family: "JetBrains Mono", "Courier New", monospace;
    font-size: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.admin-dashboard .mobile-menu-btn {
    display: none;
    background: var(--admin-glass);
    border: 1px solid var(--admin-glass-border);
    color: #fff;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 15px;
    transition: 0.3s;
}

.admin-dashboard .mobile-menu-btn svg {
    width: 20px;
    height: 20px;
}

.admin-dashboard .action-hub {
    position: fixed;
    right: clamp(18px, 1.5vw, 28px);
    top: clamp(100px, 7vw, 130px);
    bottom: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: clamp(7px, 0.6vw, 12px);
    z-index: 90;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: calc(100vh - clamp(124px, 8.5vw, 154px));
    overflow-y: auto;
    scrollbar-width: none;
    padding: 10px 0;
    scroll-behavior: smooth;
}

.admin-dashboard .action-hub::-webkit-scrollbar {
    display: none;
}

.admin-dashboard .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.admin-dashboard .hub-btn {
    width: clamp(52px, 4vw, 72px);
    height: clamp(52px, 4vw, 72px);
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: clamp(14px, 1.2vw, 20px);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(2px, 0.3vw, 5px);
    font-size: clamp(7.5px, 0.6vw, 10px);
    font-weight: 950;
    letter-spacing: clamp(0.5px, 0.05vw, 0.8px);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.admin-dashboard .hub-btn:hover {
    border-color: var(--admin-primary);
    transform: translateX(-8px) scale(1.06);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0.15) 100%);
    box-shadow: 0 0 35px var(--admin-primary-glow), 0 12px 30px rgba(0, 0, 0, 0.5);
}

.admin-dashboard .hub-btn::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.admin-dashboard .hub-btn:hover::before {
    opacity: 1;
    animation: liquidMove 4s ease-in-out infinite;
}

.admin-dashboard .hub-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-dashboard .hub-icon svg {
    width: clamp(18px, 1.5vw, 28px);
    height: clamp(18px, 1.5vw, 28px);
    stroke: currentColor;
    stroke-width: clamp(2.3, 0.03vw + 2.25, 2.8);
}

.admin-dashboard .hub-label {
    font-size: 8px;
    font-weight: 900;
    margin-top: 1px;
}

.admin-dashboard .hub-btn-danger {
    color: #fecdd3;
    border-color: rgba(244, 63, 94, 0.3);
}

.admin-dashboard .hub-btn-danger:hover {
    background: var(--admin-danger);
    border-color: #ff4d6d;
    color: #fff;
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.5);
}

.admin-dashboard .hub-divider {
    width: 28px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 8px 0;
}

@media (max-width: 1100px) {
    .admin-dashboard .mobile-menu-btn {
        display: block;
    }

    .admin-dashboard .action-hub {
        left: -280px;
        right: auto;
        top: 0;
        bottom: 0;
        width: 250px;
        transform: none !important;
        background: rgba(11, 18, 32, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 90px 20px 20px;
        border-right: 1px solid var(--admin-glass-border);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
        z-index: 1001;
    }

    .admin-dashboard.sidebar-open .action-hub {
        left: 0;
        opacity: 1;
        visibility: visible;
    }

    .admin-dashboard.sidebar-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .admin-dashboard.sidebar-open .main-content {
        filter: blur(4px);
        pointer-events: none;
        opacity: 0.5;
    }

    .admin-dashboard .hub-btn {
        width: 100%;
        height: auto;
        padding: 15px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
        border-radius: 12px;
    }
}

.admin-dashboard .main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 32px 20px;
    padding-right: 120px;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--admin-primary) transparent;
}

/* Wider content area for larger screens */
@media (min-width: 2560px) {
    .admin-dashboard .main-content {
        max-width: 1600px;
        padding-right: 120px;
    }
}

.admin-dashboard .teams-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
    min-height: 240px;
    padding-bottom: 20px;
}

/* Responsive adjustments for teams grid on larger screens */
@media (min-width: 2560px) {
    .admin-dashboard .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
        gap: 20px;
    }
}

.admin-dashboard .team-card {
    background: var(--liquid-glass-bg);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1.5px solid var(--admin-glass-border);
    border-radius: 24px;
    padding: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.admin-dashboard .team-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--liquid-shimmer);
    opacity: 0;
    transition: opacity 0.4s;
}

.admin-dashboard .team-card:hover::before {
    opacity: 1;
    animation: liquidMove 4s ease-in-out infinite;
}

.admin-dashboard .team-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 12px 48px rgba(99, 102, 241, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.admin-dashboard .team-card.expired {
    border-color: rgba(244, 63, 94, 0.3);
}

.admin-dashboard .card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.admin-dashboard .card-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
}

.admin-dashboard .card-subtitle {
    font-size: 11px;
    color: var(--admin-text-dim);
    margin-top: 4px;
}

.admin-dashboard .badge-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.admin-dashboard .badge {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.admin-dashboard .badge-online {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.admin-dashboard .badge-offline {
    background: rgba(244, 63, 94, 0.12);
    color: var(--admin-danger);
    border-color: rgba(244, 63, 94, 0.3);
}

.admin-dashboard .badge-warning {
    background: rgba(249, 115, 22, 0.12);
    color: #fb923c;
    border-color: rgba(249, 115, 22, 0.3);
}

.admin-dashboard .card-details {
    display: grid;
    gap: 4px;
    font-size: 11px;
    color: var(--admin-text-dim);
}

.admin-dashboard .card-details span {
    display: inline-block;
    min-width: 70px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-dashboard .card-details strong {
    color: #f8fafc;
    font-weight: 600;
}

.admin-dashboard .card-actions {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.admin-dashboard .btn {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1.5px solid transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e2e8f0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.admin-dashboard .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.admin-dashboard .btn:hover::before {
    width: 300px;
    height: 300px;
}

.admin-dashboard .btn:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.admin-dashboard .btn-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8) 0%, rgba(79, 70, 229, 0.9) 100%);
    border-color: rgba(99, 102, 241, 0.5);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.admin-dashboard .btn-primary:hover {
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5), 0 0 40px rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 1) 0%, rgba(79, 70, 229, 1) 100%);
}

.admin-dashboard .btn-secondary {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

.admin-dashboard .btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--admin-glass-border);
}

.admin-dashboard .btn-danger {
    background: rgba(244, 63, 94, 0.18);
    border-color: rgba(244, 63, 94, 0.4);
    color: #fecdd3;
}

.admin-dashboard .btn-danger:hover {
    background: rgba(244, 63, 94, 0.35);
}

.admin-dashboard .btn-full {
    width: 100%;
}

.admin-dashboard .btn-sm {
    font-size: 11px;
    padding: 8px 12px;
}

.admin-dashboard .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
}

.admin-dashboard .page-btn {
    background: var(--admin-glass);
    border: 1px solid var(--admin-glass-border);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.admin-dashboard .page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.admin-dashboard .page-btn:not(:disabled):hover {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
}

.admin-dashboard .page-info {
    font-family: "JetBrains Mono", "Courier New", monospace;
    color: var(--admin-text-dim);
    letter-spacing: 2px;
    font-size: 11px;
}

.admin-dashboard .empty-state {
    text-align: center;
    color: var(--admin-text-dim);
    padding: 40px 20px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 18px;
}

.admin-dashboard .modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(20px) saturate(180%);
    }
}

.admin-dashboard .modal-content {
    max-width: clamp(680px, 48vw, 1000px);
    margin: 6% auto;
    background: var(--liquid-glass-bg);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 2px solid var(--admin-glass-border);
    border-radius: clamp(28px, 2vw, 40px);
    padding: clamp(36px, 3vw, 52px);
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: clamp(1rem, 0.05vw + 0.98rem, 1.1rem);
}

.admin-dashboard .modal-content h2 {
    font-size: clamp(1.5rem, 0.2vw + 1.45rem, 1.8rem);
}

.admin-dashboard .modal-content h3 {
    font-size: clamp(1.2rem, 0.12vw + 1.16rem, 1.4rem);
}

.admin-dashboard .modal-content label {
    font-size: clamp(0.75rem, 0.06vw + 0.73rem, 0.85rem);
}

.admin-dashboard .modal-content input,
.admin-dashboard .modal-content textarea,
.admin-dashboard .modal-content select {
    font-size: clamp(0.95rem, 0.06vw + 0.93rem, 1.05rem);
    padding: clamp(12px, 0.4vw + 11px, 18px);
}

.admin-dashboard .modal-content .btn {
    font-size: clamp(0.85rem, 0.06vw + 0.83rem, 0.95rem);
    padding: clamp(12px, 0.15vw + 11.7px, 14px) clamp(16px, 0.25vw + 15.5px, 20px);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-dashboard .modal-content.modal-large {
    max-width: clamp(880px, 60vw, 1300px);
}

.admin-dashboard .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-dashboard .close-modal {
    background: transparent;
    border: none;
    color: var(--admin-text-dim);
    font-size: 28px;
    cursor: pointer;
    transition: 0.2s;
}

.admin-dashboard .close-modal:hover {
    color: #f8fafc;
}

.admin-dashboard .modal-panel {
    display: none;
}

.admin-dashboard .modal-panel.active {
    display: block;
}

.admin-dashboard .panel-subtitle {
    font-size: 12px;
    color: var(--admin-text-dim);
    margin: 10px 0 20px;
}

.admin-dashboard .panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.admin-dashboard .panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.admin-dashboard .form-group {
    margin-bottom: 18px;
}

.admin-dashboard label {
    display: block;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--admin-primary);
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-dashboard input,
.admin-dashboard textarea,
.admin-dashboard select {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid var(--admin-glass-border);
    border-radius: 14px;
    padding: 14px;
    color: #fff;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.admin-dashboard input:focus,
.admin-dashboard textarea:focus,
.admin-dashboard select:focus {
    border-color: var(--admin-primary);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.admin-dashboard textarea {
    resize: vertical;
}

.admin-dashboard input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.admin-dashboard .check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #e2e8f0;
    text-transform: none;
    letter-spacing: 0.5px;
}

.admin-dashboard .form-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-dashboard .form-sep {
    font-size: 12px;
    color: var(--admin-text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-dashboard .table-container {
    overflow-x: auto;
}

.admin-dashboard .log-table,
.admin-dashboard .custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.admin-dashboard .log-table th,
.admin-dashboard .log-table td,
.admin-dashboard .custom-table th,
.admin-dashboard .custom-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-dashboard .log-table th,
.admin-dashboard .custom-table th {
    color: var(--admin-accent);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.admin-dashboard .log-table tr:hover,
.admin-dashboard .custom-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.admin-dashboard .members-list,
.admin-dashboard .keys-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.admin-dashboard .member-item,
.admin-dashboard .key-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    background: rgba(2, 6, 23, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.admin-dashboard .member-meta,
.admin-dashboard .key-meta {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    color: var(--admin-text-dim);
    font-size: 11px;
}

.admin-dashboard code {
    background: rgba(15, 23, 42, 0.7);
    padding: 2px 6px;
    border-radius: 6px;
    font-family: "JetBrains Mono", "Courier New", monospace;
    font-size: 11px;
    color: #7dd3fc;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1100px) {
    .admin-dashboard .system-header {
        grid-template-columns: 1fr auto;
    }

    .admin-dashboard .status-overview {
        justify-content: flex-start;
    }

    .admin-dashboard .center-brand {
        display: none;
    }

    .admin-dashboard .current-time-box {
        display: none;
    }

    .admin-dashboard .stat-item:has(.status-pulse) {
        display: none;
    }
}

@media (max-width: 900px) {
    .admin-dashboard {
        height: 100vh;
        overflow: hidden;
    }

    .admin-dashboard .main-content {
        padding-bottom: 20px;
    }
}

@media (max-width: 720px) {
    .admin-dashboard .system-header {
        padding: 20px 18px 14px;
    }

    .admin-dashboard .main-content {
        padding: 16px;
        padding-right: 16px;
    }

    .admin-dashboard .card-actions {
        grid-template-columns: 1fr;
    }

    .admin-dashboard .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-dashboard .member-item,
    .admin-dashboard .key-item {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Hide title, clock, and Core Status on small screens */
    .admin-dashboard .center-brand {
        display: none;
    }

    .admin-dashboard .current-time-box {
        display: none;
    }

    .admin-dashboard .stat-item:has(.status-pulse) {
        display: none;
    }

    /* Align all visible metrics consistently */
    .admin-dashboard .system-header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .admin-dashboard .status-overview {
        display: flex;
        gap: 20px;
        align-items: center;
    }

    .admin-dashboard .header-right {
        display: flex;
        align-items: center;
    }

    .admin-dashboard .stat-item {
        padding: 10px 12px;
    }

    /* Keep sidebar at full width on small screens */
    .admin-dashboard .action-hub {
        width: 250px;
        left: -250px;
        padding: 100px 20px 20px;
    }

    .admin-dashboard .hub-btn {
        width: 100%;
        height: auto;
        padding: 15px;
        font-size: 12px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
        border-radius: 12px;
    }

    .admin-dashboard .hub-icon svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .admin-dashboard .action-hub {
        width: 200px;
        left: -200px;
    }

    .admin-dashboard .hub-btn {
        padding: 12px;
        font-size: 11px;
    }
}

.admin-dashboard .value-operational {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 1px;
    margin-top: 4px;
    text-transform: uppercase;
}

.admin-dashboard .status-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: adminPulse 2s infinite;
}

/* Custom Notification & Dialog Styles */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 320px;
}

.notification {
    background: var(--admin-glass);
    color: #fff;
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid var(--admin-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: slideInRight 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), fadeOut 0.5s linear 3.5s forwards;
    opacity: 1;
}

.notification.success {
    border-left-color: #10b981;
}

.notification.error {
    border-left-color: var(--admin-danger);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
        height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin: 0;
    }
}

.dialog-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
}

.dialog-modal.show {
    display: flex;
}

.dialog-content {
    background: #0b1220;
    border: 1px solid var(--admin-glass-border);
    border-radius: 24px;
    padding: 30px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    animation: dialogAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dialog-content h3 {
    color: #f8fafc;
    margin-bottom: 10px;
}

.dialog-content p {
    color: var(--admin-text-dim);
    margin-bottom: 20px;
}

.dialog-content textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--admin-glass-border);
    border-radius: 12px;
    padding: 12px;
    color: #fff;
    outline: none;
    transition: 0.3s;
    font-family: "JetBrains Mono", monospace;
    resize: vertical;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.dialog-buttons .btn {
    width: auto;
}

@keyframes dialogAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Auto Kick 状态徽章 - 紧凑内联样式 */
.auto-kick-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border: 2px solid #ff4757;
    border-radius: 20px;
    padding: 6px 14px;
    box-shadow: 0 2px 12px rgba(255, 75, 87, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 2px 12px rgba(255, 75, 87, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 4px 20px rgba(255, 75, 87, 0.6);
        transform: scale(1.03);
    }
}

.status-badge-icon {
    font-size: 16px;
    line-height: 1;
    animation: iconPulse 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.status-badge-text {
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 分页控制样式 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid #667eea;
    border-radius: 6px;
    background: rgba(102, 126, 234, 0.1);
    color: #e2e8f0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #475569;
}

.page-info {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
}

/* 骨架屏样式 */
/* 骨架屏相关样式 - 严格对齐真实布局 */
.admin-dashboard #teamsGrid.teams-grid {
    display: grid !important;
    /* Match the actual teams-grid settings */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 14px !important;
    align-items: start !important;
    min-height: 240px;
}

@media (min-width: 2560px) {
    .admin-dashboard #teamsGrid.teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)) !important;
        gap: 20px !important;
    }
}

.skeleton-card {
    pointer-events: none;
    /* 移除最大高度限制，允许自然伸展 */
    width: 100% !important;
    background: var(--admin-glass) !important;
    border-radius: 20px !important;
    /* 对齐真实 radius: 20px */
    border: 1px solid var(--admin-glass-border) !important;
    padding: 18px !important;
    /* 对齐真实 padding */
    display: flex !important;
    flex-direction: column !important;
}

.skeleton {
    background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}


@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 8px;
}

.skeleton-subtitle {
    height: 14px;
    width: 80%;
}

.skeleton-badge {
    height: 24px;
    width: 60px;
    border-radius: 12px;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    margin: 8px 0;
}

.skeleton-text:nth-child(2) {
    width: 85%;
}

.skeleton-text:nth-child(3) {
    width: 70%;
}

.skeleton-button {
    height: 32px;
    width: 80px;
    border-radius: 6px;
}

.error-state {
    text-align: center;
    padding: 60px 20px;
    color: #ef4444;
    font-size: 16px;
}

/* 右上角加载指示器 */
.loading-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #667eea;
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: #667eea;
    border-right-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Filterable Stat Items */
.admin-dashboard .stat-item {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.admin-dashboard .stat-item:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}

.admin-dashboard .stat-item.active-filter {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--admin-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.admin-dashboard .stat-item.active-filter::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background: var(--admin-primary);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 -2px 10px var(--admin-primary);
}

.admin-dashboard .stat-item:active {
    transform: scale(0.95);
}