* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 30, 30, .18), transparent 30%),
        radial-gradient(circle at 80% 90%, rgba(180, 0, 0, .15), transparent 30%),
        #0d0000;

    color: #fff;
    min-height: 100vh;
}

/* HEADER */

.header {
    height: 75px;
    padding: 0 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: rgba(20, 0, 0, .9);
    border-bottom: 1px solid rgba(255, 40, 40, .3);

    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 8px;
    color: #ff3131;
}

.world {
    color: #aaa;
    font-size: 14px;
    letter-spacing: 2px;
}

/* CONTAINER */

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* HERO */

.hero {
    margin-top: 50px;
    padding: 40px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border: 1px solid rgba(255, 40, 40, .25);
    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 20, 20, .13),
            rgba(20, 0, 0, .65)
        );

    box-shadow:
        0 20px 60px rgba(0, 0, 0, .45);
}

.badge {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 20px;

    background: rgba(255, 30, 30, .12);
    border: 1px solid rgba(255, 50, 50, .35);

    color: #ff5252;
    font-size: 11px;
    letter-spacing: 2px;
}

.hero h1 {
    margin-top: 12px;
    font-size: 48px;
    letter-spacing: 4px;
}

.hero p {
    margin-top: 8px;
    color: #999;
}

.guild-box {
    text-align: right;
}

.guild-box strong {
    display: block;
    font-size: 30px;
    color: #ff3d3d;
    letter-spacing: 4px;
}

.guild-box span {
    display: block;
    color: #777;
    font-size: 12px;
    margin-top: 5px;
}

.guild-box b {
    display: block;
    margin-top: 5px;
    font-size: 22px;
}

/* STATS */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;

    margin: 25px 0;
}

.stat-card {
    padding: 25px;

    border-radius: 14px;

    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .07);
}

.stat-card span {
    display: block;
    color: #777;
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
    color: #ff4141;
}

/* TABLE */

.table-section {
    margin-top: 30px;
    margin-bottom: 60px;

    border: 1px solid rgba(255, 40, 40, .2);
    border-radius: 18px;

    background: rgba(20, 0, 0, .65);
    overflow: hidden;
}

.table-header {
    padding: 25px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.table-header h2 {
    font-size: 22px;
}

.table-header p {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

#searchInput {
    width: 230px;

    padding: 12px 15px;

    border-radius: 8px;

    border: 1px solid rgba(255, 50, 50, .25);
    outline: none;

    background: #120000;
    color: white;
}

#searchInput:focus {
    border-color: #ff3434;
}

/* TABLE */

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(255, 20, 20, .07);
}

th {
    padding: 17px;
    text-align: left;

    color: #777;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 18px 17px;

    border-top: 1px solid rgba(255, 255, 255, .045);

    font-size: 14px;
}

tbody tr {
    transition: .2s;
}

tbody tr:hover {
    background: rgba(255, 30, 30, .07);
}

.rank {
    color: #777;
    font-weight: bold;
}

.player {
    font-weight: bold;
    color: #fff;
}

.position {
    color: #ff4a4a;
    font-size: 12px;
    font-weight: bold;
}

.level {
    color: #ffb0b0;
    font-weight: bold;
}

.job {
    color: #aaa;
}

/* TOP 3 */

tbody tr:nth-child(1) .rank {
    color: #ffd700;
}

tbody tr:nth-child(2) .rank {
    color: #c0c0c0;
}

tbody tr:nth-child(3) .rank {
    color: #cd7f32;
}

/* FOOTER */

footer {
    padding: 30px;
    text-align: center;

    color: #555;
    font-size: 12px;

    border-top: 1px solid rgba(255, 255, 255, .05);
}

/* =========================
   MOBILE OPTIMIZATION
========================= */

@media (max-width: 700px) {

    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    .container {
        width: 94%;
    }

    /* HEADER */

    .header {
        height: 60px;
        padding: 0 4%;

        position: sticky;
    }

    .logo {
        font-size: 17px;
        letter-spacing: 4px;
    }

    .world {
        font-size: 10px;
        letter-spacing: 1px;
    }

    /* HERO */

    .hero {
        margin-top: 18px;
        padding: 22px 18px;

        display: block;

        border-radius: 14px;
    }

    .badge {
        padding: 6px 9px;
        font-size: 9px;
        letter-spacing: 1.5px;
    }

    .hero h1 {
        margin-top: 10px;
        font-size: 30px;
        line-height: 1.1;
        letter-spacing: 2px;
    }

    .hero p {
        font-size: 12px;
        line-height: 1.5;
        margin-top: 10px;
    }

    /* GUILD */

    .guild-box {
        margin-top: 20px;
        padding-top: 18px;

        text-align: left;

        border-top: 1px solid rgba(255,255,255,.06);
    }

    .guild-box strong {
        font-size: 24px;
        letter-spacing: 3px;
    }

    .guild-box span {
        font-size: 10px;
    }

    .guild-box b {
        font-size: 18px;
    }

    /* STATS */

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;

        margin: 15px 0;
    }

    .stat-card {
        padding: 16px 14px;
        border-radius: 12px;
    }

    .stat-card span {
        font-size: 10px;
        line-height: 1.3;
    }

    .stat-card strong {
        margin-top: 5px;
        font-size: 23px;
    }

    /* TABLE SECTION */

    .table-section {
        margin-top: 18px;
        margin-bottom: 30px;

        border-radius: 14px;
    }

    .table-header {
        padding: 18px;

        display: block;
    }

    .table-header h2 {
        font-size: 18px;
    }

    .table-header p {
        font-size: 10px;
        line-height: 1.5;
    }

    #searchInput {
        width: 100%;
        height: 42px;

        margin-top: 15px;
        padding: 10px 12px;

        font-size: 13px;
    }

    /* TABLE */

    .table-wrapper {
        width: 100%;

        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    th {
        padding: 13px 12px;

        font-size: 9px;
        letter-spacing: .7px;
    }

    td {
        padding: 14px 12px;

        font-size: 12px;
    }

    .rank {
        font-size: 12px;
    }

    .player {
        font-size: 13px;
    }

    .position {
        font-size: 10px;
    }

    .level {
        font-size: 12px;
    }

    .job {
        font-size: 11px;
    }

    /* FOOTER */

    footer {
        padding: 22px 15px;

        font-size: 10px;
        line-height: 1.5;
    }
}


/* =========================
   SMALL PHONE
   480px
========================= */

@media (max-width: 480px) {

    .container {
        width: 92%;
    }

    .header {
        height: 56px;
    }

    .logo {
        font-size: 15px;
        letter-spacing: 3px;
    }

    .world {
        font-size: 9px;
    }

    .hero {
        padding: 20px 16px;
    }

    .hero h1 {
        font-size: 27px;
    }

    .hero p {
        font-size: 11px;
    }

    .guild-box strong {
        font-size: 21px;
    }

    .guild-box b {
        font-size: 16px;
    }

    .stats {
        gap: 8px;
    }

    .stat-card {
        padding: 14px 12px;
    }

    .stat-card strong {
        font-size: 20px;
    }

    .table-header {
        padding: 16px;
    }

    .table-header h2 {
        font-size: 17px;
    }
}


/* =========================
   VERY SMALL PHONE
   360px
========================= */

@media (max-width: 360px) {

    .container {
        width: 94%;
    }

    .logo {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .world {
        font-size: 8px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .stat-card {
        padding: 12px 10px;
    }

    .stat-card span {
        font-size: 9px;
    }

    .stat-card strong {
        font-size: 18px;
    }

    table {
        min-width: 560px;
    }
}