/* ===== PlayInt Page Styles ===== */
body.playint {
    background: linear-gradient(180deg, #04071a 0%, #071133 100%);
    color: #fff;
    padding: 0;
    font-family: 'Shentox', Arial, sans-serif;
    overflow-x: hidden;
}

/* ===== Fonts ===== */
@font-face {
    font-family: 'Eve Alpha';
    src: url('/styles/evealpha_bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

body.playint #eve-title {
    font-family: 'Eve Alpha', Arial, sans-serif;
    font-size: 36px;
    margin-bottom: 20px;
    color: #fff;
}

/* ===== Star Background Canvas ===== */
body.playint #stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.02), transparent 8%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 255, 255, 0.01), transparent 10%),
        linear-gradient(180deg, #04071a 0%, #071133 100%);
}

/* ===== Container ===== */
body.playint .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    background: transparent;
}

/* ===== Titles ===== */
body.playint h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 2px #00000055;
}

body.playint h3 {
    font-size: 20px;
    margin: 20px 0 10px 0;
    color: #fff;
}

body.playint #pig-title {
    margin-top: 30px;
    font-size: 32px;
    color: #fff;
    text-shadow: 2px 2px 2px #ff0000c4;
}

body.playint #result {
    color: #03a9f4;
}

/* ===== Labels ===== */
body.playint label {
    font-size: 24px;
    font-weight: bold;
    color: #f00b0bff;
}

/* ===== Search Box ===== */
body.playint .search-box {
    margin-bottom: 20px;
}

body.playint .search-box form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Rows in search box */
body.playint .search-box .search-row,
body.playint .search-box .date-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

body.playint .search-box input[type="text"],
body.playint .search-box input[type="date"] {
    padding: 6px;
    font-size: 14px;
    border-radius: 0.5em;
    border: 3px solid #f00b0bff;
    background-color: #fff;
}

body.playint .search-box input[type="text"] {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

body.playint .search-box button {
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 0.5em;
    border: none;
    background: linear-gradient(90deg, #f00b0bff, #000);
    color: #fff;
    cursor: pointer;
    font-family: 'Shentox', Arial, sans-serif;
    box-shadow: 2px 2px 3px #000000b4;
    transition: all 0.25s ease;
    max-width: 400px;
}

body.playint .search-box button:hover {
    filter: brightness(1.3);
    transform: translateY(-1px);
}

/* ===== Loading Spinner ===== */
body.playint .spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #f00b0bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin: 10px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== Collapsible Tree ===== */
body.playint .tree,
body.playint .tree ul,
body.playint .tree ul ul,
body.playint .tree ul ul ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

body.playint .tree li {
    margin: 4px 0;
}

body.playint .tree .caret {
    cursor: pointer;
    user-select: none;
}

body.playint .tree .caret::before {
    content: "\25B6";
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.2s;
}

body.playint .tree .caret-down::before {
    transform: rotate(90deg);
}

body.playint .tree .nested {
    display: none;
    padding-left: 20px;
}

body.playint .tree .nested.show {
    display: block;
}

body.playint .tree ul ul {
    padding-left: 25px;
}

body.playint .tree ul ul ul {
    padding-left: 40px;
}

/* ===== Color Dots ===== */
body.playint .color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

/* ===== Hourly Activity Chart ===== */
body.playint .hourly-chart-row {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    margin-top: 10px;
    overflow-x: auto;
}

body.playint .hour-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 20px;
}

body.playint .hour-bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    position: relative;
    height: var(--bar-height);
    background-color: #03a9f4;
    transition: height 0.3s ease, background-color 0.3s ease;
}

body.playint .hour-bar .hour-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

body.playint .hour-label {
    text-align: center;
    font-size: 12px;
    margin-top: 4px;
}

body.playint .hour-column:hover .hour-bar {
    height: calc(var(--bar-height) * 1.5);
    background-color: #f00b0bff;
}

body.playint .hour-column:hover .hour-bar .hour-percent {
    opacity: 1;
}

/* ===== Logo and Join Sections ===== */
body.playint .title-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

body.playint .logo-container {
    position: relative;
    width: 50px;
    height: 50px;
}

body.playint .logo-bg {
    width: 100%;
    height: 100%;
}

body.playint .join-container {
    display: flex;
    gap: 15px;
}

body.playint .join-container h2 {
    color: #f00b0bff;
    align-self: center;
}

body.playint .discord-logo,
body.playint .youtube-logo {
    height: 35px;
    cursor: pointer;
    transition: transform 0.2s;
}

body.playint .discord-logo:hover,
body.playint .youtube-logo:hover {
    transform: scale(1.1);
}

body.playint .youtube-logo {
    background-color: #ffffff98;
    border-radius: 0.5em;
}

body.playint #gearCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    pointer-events: none;
    z-index: 1;
    background: transparent;
}

/* ===== Date Range ===== */
body.playint .date-range {
    text-align: left;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.51);
    font-size: 1rem;
    color: #222;
    max-width: fit-content;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}

body.playint .date-range p {
    margin: 0;
    font-weight: bold;
}

body.playint .date-row.expanded {
    max-height: 100px;
}

/* Toggle Arrow & Text */
body.playint .toggle-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: #f00b0bff;
    font-size: 18px;
    margin-bottom: 6px;
}

body.playint .toggle-arrow {
    font-size: 20px;
    transition: transform 0.2s ease;
}

/* Collapsible Date Row - no need to collapse separately */
/* Filters Row */
body.playint .filters-row {
    overflow: hidden;
    max-height: 0;
    /* collapsed */
    transition: max-height 0.3s ease;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.playint .filters-row.expanded {
    max-height: 300px;
    /* enough to show dates + checkboxes */
}

/* Remove height:0 from date-row */
body.playint .date-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    /*align-items: center;*/
    margin-top: 6px;
    /* NO height or overflow rules */
}

/* Checkbox Row */
body.playint .checkbox-row {
    display: flex;
    gap: 15px;
    align-items: center;
    color: #f00b0bff;
}

/* Toggle container: text + arrow */
body.playint .toggle-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: #fff;
    font-size: 18px;
    margin-bottom: 6px;
}

body.playint .toggle-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

/* Date row and PvP row styling inside filters */
body.playint .filters-row .date-row,
body.playint .filters-row .pvp-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: fit-content;
    margin-top: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    body.playint .title-container {
        flex-direction: column;
        gap: 8px;
    }

    body.playint .search-box .search-row,
    body.playint .search-box .date-row {
        flex-direction: column;
        gap: 6px;
    }
}