/* ================== GLOBAL ================== */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, #3a0f0f, #120404);
    color: #f5e6c8;
    background-image: url('https://itekco.com/topnen.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* ================== MENU ================== */
.menu-icon {
    display: none;
    font-size: 26px;
    cursor: pointer;
    background: linear-gradient(to bottom, #7a1b1b, #3d0c0c);
    color: #ffd27f;
    border: none;
    padding: 12px;
    width: 100%;
    text-align: center;
    letter-spacing: 2px;
}

.navbar {
    display: flex;
    justify-content: center;
    background: linear-gradient(to bottom, #5b1212, #2b0707);
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    border-bottom: 2px solid #c89b3c;
}

.navbar a {
    position: relative;
    color: #f5deb3;
    padding: 15px 28px;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.navbar a::after {
    content: "";
    position: absolute;
    left: 10%;
    bottom: 8px;
    width: 0;
    height: 2px;
    background: #ffd27f;
    transition: width 0.3s;
}

.navbar a:hover {
    background: linear-gradient(to bottom, #8b1e1e, #4a0e0e);
    color: #ffd27f;
}

.navbar a:hover::after {
    width: 80%;
}

/* ================== CONTAINER ================== */
.container {
    position: relative;
    overflow: hidden;
    padding: 30px;
    max-width: 520px;
    margin: 40px auto;
    background: linear-gradient(to bottom, #2a0a0a, #140505);
    border-radius: 14px;
    border: 2px solid #c89b3c;
    box-shadow:
        0 0 30px rgba(200,155,60,0.25),
        inset 0 0 20px rgba(0,0,0,0.6);
}

/* Hoa văn cổ trang */
.container::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px dashed rgba(200,155,60,0.35);
    pointer-events: none;
}

.container::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background:
        linear-gradient(45deg,
            transparent 30%,
            rgba(255,210,127,0.08),
            transparent 70%);
    animation: longvan 6s linear infinite;
    pointer-events: none;
}

@keyframes longvan {
    0% { background-position: 0 0; }
    100% { background-position: 300px 300px; }
}

/* ================== TITLE ================== */
h1 {
    position: relative;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.9em;
    color: #ffd27f;
    letter-spacing: 3px;
    text-shadow: 0 0 8px rgba(255,210,127,0.6);
}

h1::after {
    content: "⚔";
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    color: #c89b3c;
    font-size: 22px;
}

h3 {
    text-align: center;
    margin: 20px 0 10px;
    color: #c89b3c;
    letter-spacing: 2px;
}

/* ================== TABLE ================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

td {
    padding: 12px 0;
}

td:first-child {
    font-weight: bold;
    color: #e6c27a;
    width: 40%;
}

/* ================== INPUT ================== */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    background-color: #1a0505;
    background-image:
        linear-gradient(to right,
            transparent,
            rgba(255,210,127,0.08),
            transparent);
    border: 1px solid #7a5a1f;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    color: #ffd27f;
    transition: all 0.3s;
}

input::placeholder {
    color: #bba46a;
}

input:focus {
    outline: none;
    border-color: #ffd27f;
    background-color: #230808;
    box-shadow: 0 0 10px rgba(255,210,127,0.4);
}

/* ================== CAPTCHA ================== */
.captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.captcha img {
    border: 2px solid #c89b3c;
    border-radius: 8px;
    background: #000;
    box-shadow:
        0 0 10px rgba(255,210,127,0.4),
        inset 0 0 10px rgba(0,0,0,0.8);
}

.refresh-btn {
    background: linear-gradient(to bottom, #8b1e1e, #3a0b0b);
    color: #ffd27f;
    border: 1px solid #c89b3c;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* ================== SUBMIT ================== */
input[type="submit"] {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to bottom, #9c1f1f, #4a0e0e);
    color: #ffd27f;
    border: 2px solid #c89b3c;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.15em;
    font-weight: bold;
    letter-spacing: 2px;
    margin-top: 25px;
    transition: all 0.3s;
}

input[type="submit"]::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255,210,127,0.25),
        transparent 60%);
    animation: tukuhi 3s linear infinite;
}

@keyframes tukuhi {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

input[type="submit"]:hover {
    background: linear-gradient(to bottom, #c02c2c, #6a1414);
    box-shadow: 0 0 15px rgba(255,210,127,0.6);
}

/* ================== FOOTER ================== */
footer {
    background: linear-gradient(to bottom, #2b0707, #120404);
    color: #c89b3c;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    border-top: 2px solid #7a5a1f;
    font-size: 0.9em;
    letter-spacing: 1px;
}

footer a {
    color: #ffd27f;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ================== MOBILE ================== */
@media (max-width: 768px) {
    .menu-icon { display: block; }
    .navbar { flex-direction: column; display: none; }
    .navbar.show { display: flex; }
    .container { margin: 20px; padding: 20px; }
    .captcha { flex-direction: column; }
}