:root {
    --bg: #f7e7c9;
    --bg2: #f4dfbf;
    --accent: #f2a018;
    --text: #1d1d1d;
    --muted: #444444;
    --line: #e4c18b;
}

@font-face {
    font-family: 'MyCustomFont';
    src: url('../fonts/Comic_Sans_MS_Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

body {
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8c46b;
    border-bottom: 2px solid #d19a4b;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand .logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #ffe1a6;
    display: grid;
    place-items: center;
    font-size: 18px;
    overflow: hidden;
}

.logo img {
    width: 100%;
    height: 100%;
}

.hero {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 56px 20px 80px;
    background:
        radial-gradient(transparent 1px, rgba(255, 255, 255, 0.35) 1px),
        linear-gradient(180deg, var(--bg2), var(--bg));
    background-size: 10px 10px, 100% 100%;
}

.hero-content {
    max-width: 980px;
    width: auto;
    margin: 0 auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.hero-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 14px;
}

.hero-logo .logo {
    width: 56px;
    height: 56px;
    font-size: 28px;
    border-radius: 16px;
}

.hero-logo span {
    font-size: 26px;
    font-weight: 700;
}

h1 {
    font-size: clamp(60px, 4.2vw, 100px);
    white-space: nowrap;
    font-weight: 800;
    letter-spacing: 1px;
    margin-top: 62px;
}

h1 .accent {
    color: var(--accent);
}

.subtitle {
    color: var(--muted);
    font-size: 22px;
    margin-bottom: 26px;
}

.actions {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 64px;
}

.btn {
    min-width: 160px;
    padding: 12px 20px;
    background: #101010;
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.customfont {
    font-family: 'MyCustomFont'
}

.btn img {
    width: 24px;
    height: 24px;
}

.btn:active {
    transform: translateY(2px);
}

.btn .icon {
    font-size: 16px;
}


.main {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 56px 20px 80px;
    background:
        radial-gradient(transparent 1px, rgba(255, 255, 255, 0.35) 1px),
        linear-gradient(180deg, var(--bg2), var(--bg));
    background-size: 10px 10px, 100% 100%;
}

.error-container {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

.error-code {
    font-family: 'MyCustomFont', cursive;
    font-size: 120px;
    color: var(--accent);
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.error-message {
    font-size: 24px;
    margin: 10px 0 20px;
    font-weight: 600;
}

.error-desc {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

@media (max-width: 640px) {
    .topbar {
        height: 56px;
        padding: 0 14px;
    }

    .brand .logo {
        width: 30px;
        height: 30px;
    }

    .hero {
        padding: 40px 16px 60px;
    }

    .hero-logo .logo {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    h1 {
        font-size: clamp(24px, 4.2vw, 40px);
        white-space: normal;
        display: block;
        margin-top: 51px;
    }

    .subtitle {
        font-size: clamp(13px, 2.2vw, 16px);
    }

    .btn {
        min-width: 140px;
        padding: 11px 16px;
    }

    .main {
        padding: 40px 16px 60px;
    }

    .error-code {
        font-size: 80px;
    }

    .error-message {
        font-size: 20px;
    }
}
