* {
    box-sizing: border-box;
}

:root {
    --bg-top: #fff7d6;
    --bg-mid: #f9ffd9;
    --bg-bottom: #e9f6ff;
    --card-bg: rgba(255, 255, 255, 0.92);
    --card-border: #f4d78f;
    --text: #2f2a24;
    --muted: #6d6154;
    --accent: #e6812d;
    --accent-2: #5da94f;
    --line: #efdfbf;
    --danger-bg: #ffe5e8;
    --danger-text: #8c1830;
    --success-bg: #e4f8df;
    --success-text: #2d6b25;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Verdana", sans-serif;
    color: var(--text);
    background-color: var(--bg-mid);
    background-image:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.75), transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(255, 236, 176, 0.65), transparent 40%),
        radial-gradient(circle at 10% 85%, rgba(199, 239, 202, 0.6), transparent 35%),
        linear-gradient(180deg, var(--bg-top), var(--bg-mid) 45%, var(--bg-bottom)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='180' viewBox='0 0 220 180'%3E%3Cellipse cx='45' cy='38' rx='18' ry='24' fill='%23f7a6b8' fill-opacity='.24'/%3E%3Cellipse cx='45' cy='38' rx='6' ry='3' fill='%23ffffff' fill-opacity='.7'/%3E%3Cellipse cx='128' cy='82' rx='16' ry='22' fill='%2380c8ff' fill-opacity='.22'/%3E%3Cellipse cx='128' cy='82' rx='5' ry='3' fill='%23ffffff' fill-opacity='.62'/%3E%3Cellipse cx='190' cy='30' rx='15' ry='20' fill='%2392d081' fill-opacity='.22'/%3E%3Cellipse cx='190' cy='30' rx='5' ry='2.8' fill='%23ffffff' fill-opacity='.62'/%3E%3C/svg%3E");
    background-attachment: fixed, fixed, fixed, fixed, scroll;
    background-size: auto, auto, auto, auto, 280px 220px;
}

.container {
    max-width: 780px;
    margin: 44px auto;
    padding: 0 16px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 16px 34px rgba(82, 71, 30, 0.12);
    backdrop-filter: blur(2px);
}

h1, h2 {
    margin-top: 0;
    color: #6d4a1f;
}

h1 {
    letter-spacing: 0.2px;
}

label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5cf9a;
    border-radius: 10px;
    font-size: 15px;
    background: #fffdf4;
    color: var(--text);
}

input:focus {
    outline: 2px solid rgba(230, 129, 45, 0.25);
    border-color: var(--accent);
}

button,
.link-btn {
    display: inline-block;
    margin-top: 14px;
    background: linear-gradient(135deg, var(--accent), #ec9a4e);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 8px 18px rgba(210, 113, 34, 0.3);
}

button:hover,
.link-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 10px 20px rgba(210, 113, 34, 0.34);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    margin-top: 12px;
}

.checkbox input {
    width: auto;
}

.error {
    color: var(--danger-text);
    background: var(--danger-bg);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #f4bcc7;
}

.success {
    color: var(--success-text);
    background: var(--success-bg);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #c9eac1;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

th, td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--line);
}

th {
    color: #6f542b;
}

.role-cell {
    width: 72px;
    text-align: center;
}

.role-icon {
    font-size: 23px;
    vertical-align: middle;
}

.role-icon-admin {
    color: #d07122;
}

.role-icon-user {
    color: #4f6f96;
}

.secret-draw {
    margin-top: 16px;
    border: 1px solid #e9d29d;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff9ea;
}

.secret-draw summary {
    cursor: pointer;
    font-weight: 600;
    color: #6f542b;
}

.secret-draw[open] summary {
    margin-bottom: 8px;
}

.hint {
    margin: 8px 0 10px;
    color: var(--muted);
}

@media (max-width: 640px) {
    .container {
        margin-top: 22px;
    }

    .card {
        padding: 16px;
    }
}
