:root {
    --color-bg: #fdfbf7;
    --color-surface: #fff0f5;
    --color-text: #4a042e;
    --color-text-muted: #8e4d73;
    --color-primary: #e673ba;
    --color-primary-dark: #b84d8f;
    --color-secondary: #fce7f3;
    --color-border: #fbcfe8;
    --color-success: #10b981;
    --color-danger: #ef4444;

    --font-main: 'Atkinson Hyperlegible', sans-serif;
    --font-mono: 'Courier New', monospace;

    --shadow-lamp: 0 4px 20px rgba(230, 115, 186, 0.25), 0 0 10px rgba(230, 115, 186, 0.1);
    --shadow-sm: 2px 2px 0px rgba(230, 115, 186, 0.15);

    --radius: 2px;
    --header-height: 60px;
}

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

body {
    font-family: var(--font-main);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-bg);
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 30%, #fffefc 0%, #fdfbf7 70%);
    cursor: crosshair;
    /* Unsettling cursor */
}

/* Lowercase override */
h1,
h2,
h3,
h4,
h5,
h6,
.btn,
.nav-link,
.logo-text,
.subtitle,
label,
th,
td {
    text-transform: lowercase;
}

a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed var(--color-primary);
    transition: all 0.2s;
}

a:hover {
    background-color: var(--color-secondary);
    border-bottom-style: solid;
    font-style: italic;
    /* Mildly unsettling change */
}

/* Header */
.app-header {
    background: transparent;
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    backdrop-filter: blur(4px);
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    margin-right: 3rem;
    color: var(--color-primary);
    font-family: var(--font-mono);
    letter-spacing: -0.05em;
}

.app-nav {
    display: flex;
    gap: 2rem;
    flex: 1;
}

.nav-link {
    color: var(--color-text-muted);
    font-weight: 400;
    border-bottom: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
    text-decoration: line-through;
    background: none;
}

.user-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Layout */
.app-content {
    margin-top: var(--header-height);
    padding: 4rem 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    min-height: calc(100vh - var(--header-height) - 80px);
}

/* Cards - Reduced wobble, increased "unease" */
.card,
.form-card,
.search-result,
.hero,
.wobbly-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    /* Less extreme wobble, more "hand-drawn rectangle" */
    border-radius: 2px 255px 3px 25px / 255px 5px 225px 3px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    position: relative;
    /* Subtle breathing animation */
    animation: breathe 8s infinite alternate ease-in-out;
}

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

    100% {
        transform: scale(1.002) rotate(0.05deg);
    }
}

/* Typography */
h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    font-weight: 400;
    text-align: center;
    letter-spacing: -0.08em;
    /* Uncomfortably tight */
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    letter-spacing: 0.05em;
    /* Uncomfortably loose */
}

h3 {
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

/* Inputs - Slightly misaligned */
.input,
textarea,
select,
.input-sm,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"] {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 3px 255px 3px 255px / 255px 3px 225px 3px;
    /* Weird input shape */
    font-family: var(--font-mono);
    margin-bottom: 0.5rem;
    background: #fff;
    color: var(--color-text);
    transition: all 0.2s;
    outline: none;
}

.input:focus,
.input-sm:focus,
select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-secondary);
    transform: skewX(-1deg);
    /* Unsettling input focus */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-mono);
    cursor: help;
    /* Weird cursor */
    border-radius: 255px 15px 25px 3px / 15px 225px 3px 255px;
    transition: transform 0.1s;
    font-size: 1rem;
}

.btn:hover {
    filter: hue-rotate(10deg);
}

.btn:active {
    transform: scale(0.98);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

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

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

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

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.grid-span-all {
    grid-column: 1 / -1;
}

.badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: 99px;
    font-size: 0.8em;
    font-family: var(--font-mono);
    background: var(--color-secondary);
    color: var(--color-text-muted);
}


/* Domain List */
.domain-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.domain-list li {
    margin-bottom: 0.75rem;
}

.domain-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 2px 15px 3px 5px / 15px 3px 5px 3px;
    transition: all 0.2s;
}

.domain-row:hover {
    transform: scale(1.01);
    border-color: var(--color-primary);
    box-shadow: 2px 2px 0 rgba(230, 115, 186, 0.1);
}

.domain-row strong {
    font-family: var(--font-mono);
    font-size: 1.1rem;
}

/* === DNS UI Specifics === */

.hosting-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdf2f8;
    border: 1px solid var(--color-primary);
}

/* DNS Record Management Styles */
.rec-controls {
    margin-bottom: 2rem;
    background: #fff;
    padding: 1.5rem;
    border: 1px dashed var(--color-border);
    border-radius: 2px 255px 3px 25px / 255px 5px 225px 3px;
}

.rec-form {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr 100px 90px 2fr auto;
    align-items: start;
}

/* Mobile responsive for form */
@media (max-width: 700px) {
    .rec-form {
        grid-template-columns: 1fr;
    }
}

.rrset-card {
    background: #fff;
    border: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 255px 2px 225px 3px / 2px 225px 3px 255px;
    /* Different wobble pattern */
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.03);
}

.rrset-header {
    background: var(--color-secondary);
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

.rrset-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rrset-name {
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--color-text);
}

.badge-type {
    background: var(--color-primary);
    color: #fff;
    font-weight: bold;
}

.rrset-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9em;
    color: var(--color-text-muted);
}

.rrset-records {
    padding: 0;
}

.rrset-record {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f3f3f3;
}

.rrset-record:last-child {
    border-bottom: none;
}

.rrset-rdata {
    font-family: var(--font-mono);
    word-break: break-all;
    flex: 1;
    margin-right: 1.5rem;
    font-size: 0.95rem;
    color: #333;
}

.rrset-actions {
    flex-shrink: 0;
}

/* Unsettling Elements for Main Page Poem */
.poem-container p:nth-child(odd) {
    margin-left: 20px;
}

.poem-container p:nth-child(even) {
    margin-right: 20px;
    text-align: right;
}

/* Loader */
.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

body.is-loading .app-loader {
    display: flex;
}

.app-loader-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
}

.app-loader-body {
    position: relative;
    z-index: 2;
    text-align: center;
}

.spinner-eye {
    width: 60px;
    height: 60px;
    background: #fff;
    border: 2px solid var(--color-text);
    border-radius: 50%;
    margin: 0 auto 1rem;
    position: relative;
    overflow: hidden;
    animation: blink 4s infinite;
}

.pupil {
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: look 3s infinite;
}

@keyframes blink {

    0%,
    48%,
    52%,
    100% {
        height: 60px;
        border-width: 2px;
        background: #fff;
    }

    50% {
        height: 4px;
        border-width: 0;
        background: var(--color-text);
    }
}

@keyframes look {

    0%,
    100% {
        transform: translate(-50%, -50%);
    }

    25% {
        transform: translate(-80%, -50%);
    }

    75% {
        transform: translate(-20%, -30%);
    }
}