:root {
    --saffron: #ff9933;
    --green: #138808;
    --accent: #6c8cff;
    --accent2: #b06cff;
    --ink-900: #0a0a12;
    --ink-800: #12121e;
    --text: #eaeaf2;
    --text-dim: rgba(234, 234, 242, 0.62);
    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    padding: 0 20px 60px;
    background: linear-gradient(-45deg, #0a0a12, #16121f, #0d1524, #1a1020);
    background-size: 400% 400%;
    animation: bgShift 18s ease infinite;
}

@keyframes bgShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Decorative floating blobs */
body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.28;
    z-index: -1;
    animation: floaty 12s ease-in-out infinite;
}
body::before {
    width: 340px;
    height: 340px;
    top: -80px;
    right: -60px;
    background: radial-gradient(circle, var(--saffron), transparent 70%);
}
body::after {
    width: 380px;
    height: 380px;
    bottom: -100px;
    left: -80px;
    background: radial-gradient(circle, var(--green), transparent 70%);
    animation-delay: -6s;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-24px) scale(1.06); }
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 -20px 30px;
    padding: 14px 24px;
    background: rgba(10, 10, 18, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--glass-border);
}

nav .brand {
    font-weight: 800;
    font-size: 18px;
    margin-right: auto;
    letter-spacing: 0.3px;
    background: linear-gradient(90deg, #00e5ff, #7a5cff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav a {
    display: inline-block;
    padding: 8px 14px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 999px;
    transition: all 0.25s ease;
}

nav a:hover {
    color: #fff;
    background: var(--glass);
}

nav a.active {
    color: #fff;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    box-shadow: 0 6px 18px rgba(108, 140, 255, 0.35);
}

/* Headings */
h1 {
    max-width: 1000px;
    margin: 10px auto 4px;
    font-size: 34px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent), var(--accent2), var(--saffron));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    color: var(--text);
}

.subtitle {
    max-width: 1000px;
    margin: 0 auto 10px;
    color: var(--text-dim);
}

/* Main tables */
table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    max-width: 1000px;
    margin: 24px auto;
    font-size: 18px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

th, td {
    border-bottom: 1px solid var(--glass-border);
    padding: 18px 20px;
    text-align: left;
    vertical-align: top;
}

th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 13px;
    color: var(--text-dim);
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Links styled as buttons inside content */
td a,
.btn {
    display: inline-block;
    padding: 9px 16px;
    margin: 3px 4px 3px 0;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

td a:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 140, 255, 0.4);
}

/* Form fields */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="file"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
select,
textarea {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.25);
}

input::placeholder,
textarea::placeholder {
    color: rgba(234, 234, 242, 0.4);
}

select option {
    background: #12121e;
    color: var(--text);
}

label {
    margin-right: 14px;
    cursor: pointer;
}

button {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #fff;
    border: none;
    padding: 9px 18px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 140, 255, 0.4);
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

progress {
    width: 220px;
    height: 16px;
    vertical-align: middle;
}

input[type="range"] {
    accent-color: var(--accent);
    vertical-align: middle;
}

dialog {
    background: var(--ink-800);
    color: var(--text);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

dialog::backdrop {
    background: rgba(5, 5, 12, 0.7);
    backdrop-filter: blur(4px);
}

/* Nested web table */
#webTable {
    width: auto;
    font-size: 14px;
    margin: 0;
    box-shadow: none;
}
#webTable th,
#webTable td {
    padding: 8px 12px;
}
#webTable a {
    padding: 4px 10px;
    font-size: 12px;
}

iframe {
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: #fff;
}

/* Drag & drop boxes */
#box1 {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    text-align: center;
    line-height: 110px;
    font-weight: 700;
    border-radius: 14px;
    cursor: move;
    display: inline-block;
    box-shadow: 0 10px 24px rgba(108, 140, 255, 0.35);
}
#box2, #box3 {
    width: 150px;
    height: 150px;
    border: 2px dashed var(--glass-border);
    border-radius: 14px;
    display: inline-block;
    vertical-align: top;
    text-align: center;
    line-height: 150px;
    color: var(--text-dim);
    margin-left: 10px;
}

/* About page */
.about-card {
    max-width: 900px;
    margin: 30px auto;
    padding: 40px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: center;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    animation: rise 0.6s ease both;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 54px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--saffron), #fff5, var(--green));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    margin: 0 auto;
    animation: floaty 6s ease-in-out infinite;
    overflow: hidden;
    padding: 4px;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.about-card .eyebrow {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--saffron);
}

.about-card h1 {
    margin: 14px 0 0;
    text-align: left;
}

.about-card p.bio {
    color: var(--text-dim);
    font-size: 17px;
    line-height: 1.7;
}

.about-card strong {
    color: var(--text);
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin: 20px 0;
    color: var(--text-dim);
}

.stat-row .stat strong {
    color: #fff;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
}

@media (max-width: 640px) {
    .about-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-card h1 { text-align: center; }
}

/* Login form */
.login-card {
    max-width: 420px;
    margin: 30px auto;
    padding: 36px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    animation: rise 0.5s ease both;
}

.login-card form {
    display: flex;
    flex-direction: column;
}

.field-label {
    margin: 14px 0 6px;
    font-size: 14px;
    color: var(--text-dim);
    cursor: default;
}

.login-card input {
    width: 100%;
}

.login-card button {
    margin-top: 22px;
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.login-error {
    color: #ff6b6b;
    font-weight: 600;
    margin: 14px 0 0;
    min-height: 20px;
}

.welcome-card {
    text-align: center;
}
.welcome-card h1 {
    text-align: center;
}

p[id$="Output"],
span[id$="Output"],
#output,
#idStatus,
#buttonStatus {
    color: var(--saffron);
    font-weight: 600;
}
