/* CSS Reset - Modern Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}

body {
    margin: 0;
    font-family: inherit;
    line-height: inherit;
}

hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
}

abbr[title] {
    text-decoration: underline dotted;
}

h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
}

a {
    color: inherit;
    text-decoration: inherit;
}

b, strong {
    font-weight: bolder;
}

code, kbd, samp, pre {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 1em;
}

small {
    font-size: 80%;
}

sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
}

button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

button, select {
    text-transform: none;
}

button, [type='button'], [type='reset'], [type='submit'] {
    -webkit-appearance: button;
    background-color: transparent;
    background-image: none;
}

:-moz-focusring {
    outline: auto;
}

:-moz-ui-invalid {
    box-shadow: none;
}

progress {
    vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
    height: auto;
}

[type='search'] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

summary {
    display: list-item;
}

blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre {
    margin: 0;
}

fieldset {
    margin: 0;
    padding: 0;
}

legend {
    padding: 0;
}

ol, ul, menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

dialog {
    padding: 0;
}

textarea {
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    opacity: 1;
    color: hsl(var(--muted-foreground));
}

button, [role="button"] {
    cursor: pointer;
}

:disabled {
    cursor: default;
}

img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
}

img, video {
    max-width: 100%;
    height: auto;
}

[hidden] {
    display: none;
}

/* Shadcn-inspired Design System */
:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 0 0% 10%;               /* Black for light theme buttons */
    --primary-foreground: 0 0% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 0 0% 10%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 0 0% 46.9%;
    --accent: 0 0% 96.1%;
    --accent-foreground: 0 0% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 0 0% 75%;
    --input: 0 0% 75%;
    --ring: 222.2 84% 4.9%;
    --radius: 0.5rem;
}

/* Dark Theme - Grey/Black */
[data-theme="dark"],
.dark {
    --background: 0 0% 3.9%;
    --foreground: 0 0% 98%;
    --card: 0 0% 7%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 7%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 14.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 14.9%;
    --muted-foreground: 0 0% 63.9%;
    --accent: 0 0% 14.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 22%;
    --input: 0 0% 22%;
    --ring: 0 0% 83.1%;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --background: 0 0% 3.9%;
        --foreground: 0 0% 98%;
        --card: 0 0% 7%;
        --card-foreground: 0 0% 98%;
        --popover: 0 0% 7%;
        --popover-foreground: 0 0% 98%;
        --primary: 0 0% 98%;
        --primary-foreground: 0 0% 9%;
        --secondary: 0 0% 14.9%;
        --secondary-foreground: 0 0% 98%;
        --muted: 0 0% 14.9%;
        --muted-foreground: 0 0% 63.9%;
        --accent: 0 0% 14.9%;
        --accent-foreground: 0 0% 98%;
        --destructive: 0 62.8% 30.6%;
        --destructive-foreground: 0 0% 98%;
        --border: 0 0% 22%;
        --input: 0 0% 22%;
        --ring: 0 0% 83.1%;
    }
}

body {
    font-family: 'Inter', inherit;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: inherit;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    padding: 0.5rem 1rem;
    height: 2.5rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover:not(:disabled) {
    background-color: hsl(var(--primary) / 0.8);
}

.btn-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover:not(:disabled) {
    background-color: hsl(var(--secondary) / 0.8);
}

.btn-destructive {
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover:not(:disabled) {
    background-color: hsl(var(--destructive) / 0.9);
}

.btn-outline {
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
    background-color: transparent;
}

.btn-outline:hover:not(:disabled) {
    background-color: hsl(var(--border) / 0.2);
}

.btn-ghost {
    background-color: transparent;
    color: hsl(var(--primary));
}

.btn-ghost:hover:not(:disabled) {
    background-color: hsl(0 0% 10% / 0.05);
}

.dark .btn-ghost:hover:not(:disabled) {
    background-color: hsl(0 0% 98% / 0.1);
}

.btn-sm {
    height: 2.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    height: 2.75rem;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
}

/* Input Styles */
.input {
    display: flex;
    height: 2.5rem;
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--input));
    background-color: hsl(var(--background));
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    appearance: none;
}

.input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Select (Shadcn-style) */
.select {
    display: flex;
    height: 2.5rem;
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--input));
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, hsl(var(--muted-foreground)) 50%),
        linear-gradient(135deg, hsl(var(--muted-foreground)) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.select:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Radio controls */
/* Radio Button */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px !important;
    height: 18px !important;
    border: 1px solid hsl(var(--input));
    border-radius: 50%;
    background: hsl(var(--background));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
    position: relative;
}

input[type="radio"]:checked {
    border-color: hsl(var(--primary));
    background: hsl(var(--background));
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.2);
}

input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: hsl(var(--primary));
}

input[type="radio"]:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* Character selection cards - border by default, lighter border when selected */
#characterList .card {
    border: 1px solid hsl(var(--border));
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#characterList .card:has(input[type="radio"]:checked) {
    border-color: hsl(var(--muted));
    box-shadow: 0 0 0 1px hsl(var(--border) / 0.1);
}

/* Card Styles */
.card {
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.card-header {
    display: flex;
    flex-direction: column;
    space-y: 1.5rem;
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.025em;
}

.card-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.card-content {
    padding: 1.5rem;
    padding-top: 0;
}

.card-footer {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    padding-top: 0;
}

/* Alert Styles */
.alert {
    position: relative;
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border));
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: hsl(142 76% 36% / 0.1);
    border-color: hsl(142 76% 36%);
    color: hsl(142 76% 36%);
}

.alert-error {
    background-color: hsl(var(--destructive) / 0.1);
    border-color: hsl(var(--destructive));
    color: hsl(var(--destructive));
}

.alert-info {
    background-color: hsl(217 91% 60% / 0.1);
    border-color: hsl(217 91% 60%);
    color: hsl(217 91% 60%);
}

/* Toasts */
#toast-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    border-radius: var(--radius);
    padding: 0.55rem 0.85rem;
    color: hsl(0 0% 96%);
    box-shadow: 0 12px 30px rgb(0 0 0 / 0.2);
    border: 1px solid hsl(0 0% 28%);
    background-color: hsl(0 0% 8% / 0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    animation: toast-slide 0.25s ease;
}

.toast-success,
.toast-error,
.toast-info {
    border-color: hsl(0 0% 32%);
}

.toast-hide {
    opacity: 0;
    transform: translateY(-8px);
}

.toast::before {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    opacity: 0.9;
}

.toast-success::before {
    content: "";
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' fill-rule='evenodd' d='M12 21a9 9 0 1 0 0-18a9 9 0 0 0 0 18m-.232-5.36l5-6l-1.536-1.28l-4.3 5.159l-2.225-2.226l-1.414 1.414l3 3l.774.774z' clip-rule='evenodd' /></svg>") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' fill-rule='evenodd' d='M12 21a9 9 0 1 0 0-18a9 9 0 0 0 0 18m-.232-5.36l5-6l-1.536-1.28l-4.3 5.159l-2.225-2.226l-1.414 1.414l3 3l.774.774z' clip-rule='evenodd' /></svg>") center / contain no-repeat;
    background: #22c55e;
}

.toast-error::before {
    content: "";
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='black' d='m8.4 17l3.6-3.6l3.6 3.6l1.4-1.4l-3.6-3.6L17 8.4L15.6 7L12 10.6L8.4 7L7 8.4l3.6 3.6L7 15.6zm3.6 5q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22'/></svg>") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='black' d='m8.4 17l3.6-3.6l3.6 3.6l1.4-1.4l-3.6-3.6L17 8.4L15.6 7L12 10.6L8.4 7L7 8.4l3.6 3.6L7 15.6zm3.6 5q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22'/></svg>") center / contain no-repeat;
    background: hsl(var(--destructive));
}

.toast-info::before {
    content: "i";
}

@keyframes toast-slide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.form-error {
    font-size: 0.875rem;
    color: hsl(var(--destructive));
    margin-top: 0.25rem;
}

/* Layout */
.header {
    border-bottom: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-image {
    height: 2rem;
    width: auto;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.footer {
    border-top: 1px solid hsl(var(--border));
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-note {
    margin: 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.footer-socials {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-brand img {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
}

/* Checkbox */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px !important;
    height: 18px !important;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--background));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.2);
    position: relative;
}

input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    width: 11px !important;
    height: 11px !important;
    background: hsl(var(--background));
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z'/></svg>") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z'/></svg>") center / contain no-repeat;
}

input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.35);
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: hsl(var(--muted-foreground));
}

.link {
    color: hsl(var(--primary));
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.link:hover {
    text-decoration: underline;
}

.social-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.social-icon svg {
    width: 100%;
    height: 100%;
}

.social-icon:hover {
    transform: scale(1.12);
    color: hsl(var(--primary));
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Modal Animations */
.modal-overlay {
    transition: opacity 0.2s ease;
    opacity: 1;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.modal-overlay.modal-hidden {
    opacity: 0;
}
.modal-overlay.modal-hidden {
    opacity: 0;
}
.modal-card {
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 1;
    transform: scale(1);
}
.modal-card.modal-hidden {
    opacity: 0;
    transform: scale(1.06);
}
.modal-card.modal-hidden {
    opacity: 0;
    transform: scale(1.06);
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid hsl(var(--border));
}

.table th {
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background-color: hsl(var(--accent) / 0.5);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: colors;
    text-transform: capitalize;
}

.badge-success {
    background-color: hsl(142 76% 36% / 0.1);
    color: hsl(142 76% 36%);
}

.badge-pending {
    background-color: hsl(38 92% 50% / 0.1);
    color: hsl(38 92% 50%);
}

.badge-failed {
    background-color: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid hsl(var(--muted));
    border-top-color: hsl(var(--primary));
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.spinner-inline {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.35em;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z' opacity='0.25'/><path fill='black' d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'/></svg>") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z' opacity='0.25'/><path fill='black' d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'/></svg>") center / contain no-repeat;
    background: currentColor;
    animation: spin 0.75s linear infinite;
    opacity: 0.9;
}

/* Skeletons */
.skeleton {
    position: relative;
    overflow: hidden;
    background: hsl(var(--muted));
    border-radius: 0.5rem;
}

.skeleton-line {
    height: 0.9rem;
    margin: 0.4rem 0;
}

.skeleton-pill {
    height: 2.5rem;
    border-radius: 999px;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent,
        hsl(var(--muted-foreground)),
        transparent);
    animation: shimmer 1.2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Theme Toggle Button */
#theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#theme-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    width: 1.25rem;
    height: 1.25rem;
}

#theme-icon svg {
    width: 100%;
    height: 100%;
}

#theme-toggle:hover #theme-icon {
    transform: rotate(15deg);
}

/* View Transitions for Theme Switching */
@supports (view-transition-name: none) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
        mix-blend-mode: normal;
    }

    ::view-transition-new(root) {
        animation: theme-reveal 0.4s ease-in-out forwards;
    }
}

@keyframes theme-reveal {
    from {
        clip-path: circle(0% at var(--x, 100%) var(--y, 0%));
        opacity: 0.7;
    }
    to {
        clip-path: circle(150% at var(--x, 100%) var(--y, 0%));
        opacity: 1;
    }
}

/* Slide-up blur animation for waterfall effect */
@keyframes slideUpBlur {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.animate-slide-up {
    animation: slideUpBlur 0.6s ease-out forwards;
    opacity: 0;
}

.animate-slide-up-delay-1 {
    animation-delay: 0.2s;
}

.animate-slide-up-delay-2 {
    animation-delay: 0.4s;
}

.animate-slide-up-delay-3 {
    animation-delay: 0.6s;
}

.animate-slide-up-delay-4 {
    animation-delay: 0.8s;
}

.animate-slide-up-delay-5 {
    animation-delay: 1s;
}

/* Turnstile Widget Styling */
#turnstile-widget {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

#turnstile-widget iframe {
    border-radius: var(--radius);
}


