﻿body, .hw-background {
    background: linear-gradient(120deg, #181824 0%, #23243a 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    color: #e0e6f6;
    margin: 0;
    padding: 0;
}

.hw-card, .card {
    background: linear-gradient(120deg, #23243a 0%, #181824 100%);
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(0,0,0,0.7);
    border: 1px solid #2e2e4d;
    max-width: 1000px;
    width: 100%;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    position: relative;
    transition: box-shadow 0.2s;
}

.hw-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px #0f3460;
}

.form-control {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-control label {
    text-align: left;
    width: 100%;
    max-width: 320px;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0.1rem;
    display: block;
}

label {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #ffd700;
    text-shadow: 0 1px 4px #0f3460;
}

input, select {
    padding: 0.7rem;
    border-radius: 8px;
    border: 1px solid #444466;
    background: #23243a;
    color: #e0e6f6;
    font-size: 1rem;
    margin-bottom: 0.2rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px #181824;
}

    input:focus, select:focus {
        border-color: #ffd700;
        outline: none;
        box-shadow: 0 0 0 2px #ffd700;
    }

input[type="date"],
input.input-time,
select,
.input-select {
    width: 100%;
    max-width: 320px;
    min-width: 120px;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}

input[type="date"]:focus,
input.input-time:focus,
select:focus,
.input-select:focus {
    border-color: #ffd700;
    outline: none;
    box-shadow: 0 0 0 2px #ffd700;
}

.btn-primary {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.15rem;
    background: linear-gradient(90deg, #ffd700 0%, #e94560 100%);
    color: #23243a;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 2px 8px #0f3460;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #e94560 0%, #ffd700 100%);
    color: #ffd700;
}

.hw-quickgrid-container {
    display: block;
    margin-top: 24px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.hw-quickgrid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

    .hw-quickgrid .sort-indicator {
        display: none !important;
    }

.hw-quickgrid table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    background: linear-gradient(120deg, #23243a 0%, #181824 100%);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    table-layout: fixed;
}

.hw-quickgrid th, .hw-quickgrid td, .hw-quickgrid td.col-justify-start {
    width: 14.28%;
    min-width: 100px;
    max-width: 180px;
    box-sizing: border-box;
    padding: 8px 2px;
    text-align: left;
    color: #e0e6f6;
    background: transparent;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 1em;
    position: relative;
    border-bottom: 1px solid #2e2e4d;
}

.hw-quickgrid th {
    background: linear-gradient(90deg, #23243a 0%, #181824 100%);
    color: #ffd700;
    font-weight: 600;
    text-shadow: 0 1px 4px #0f3460;
    border-bottom: 2px solid #ffd700;
    letter-spacing: 1px;
    font-size: 1em;         /* Match .hw-outcome-table th */
    padding: 8px 2px;       /* Match .hw-outcome-table th */
    border: none;
    box-shadow: none;
    white-space: nowrap; /* Prevent word wrap */
}

.hw-quickgrid td.col-justify-start {
    text-align: left;
}

.hw-quickgrid tr:hover td,
.hw-quickgrid tr:hover td.col-justify-start {
    background: #23243a;
    color: #ffd700 !important;
    font-weight: 600;
}

.hw-quickgrid tr:last-child td {
    border-bottom: none;
}

.card {
    background: linear-gradient(120deg, #23243a 0%, #181824 100%);
    border-radius: 14px;
    box-shadow: 0 2px 8px #181824;
    border: 1px solid #2e2e4d;
    margin: 1rem 0;
    padding: 1rem;
    color: #ffd700;
}

.login-link {
    color: #ffd700;
    font-weight: 500;
    margin-right: 1.2rem;
    text-decoration: none;
    transition: color 0.2s;
}
.login-link:hover {
    color: #e94560;
    text-decoration: underline;
}

.form-layout {
    background: linear-gradient(120deg, #23243a 0%, #181824 100%);
    border-radius: 14px;
    box-shadow: 0 2px 8px #181824;
    border: 1px solid #2e2e4d;
    padding: 2rem;
    color: #ffd700;
}

.close-button-section .btn-close {
    background-color: #e94560;
    border-radius: 50%;
    border: none;
    width: 2rem;
    height: 2rem;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px #181824;
    transition: background 0.2s;
}
.close-button-section .btn-close:hover {
    background-color: #ffd700;
    color: #23243a;
}

.hw-healthbar-container {
    width: 300px;
    height: 20px;
    background: linear-gradient(90deg, #23243a 0%, #181824 100%);
    border-radius: 14px;
    box-shadow: 0 2px 8px #181824;
    border: 1px solid #2e2e4d;
    position: relative;
    overflow: hidden;
    margin: 5px 20px;
    display: flex;
    align-items: center;
}

.hw-healthbar-fill {
    height: 100%;
    border-radius: 14px 0 0 14px;
    transition: width 0.4s;
    position: absolute;
    left: 0;
    top: 0;
}

.hw-healthbar-fill-success {
    background: linear-gradient(90deg, #43ea6d 0%, #1fd655 100%);
}

.hw-healthbar-fill-warning {
    background: linear-gradient(90deg, #ffd700 0%, #e94560 100%);
}

.hw-healthbar-fill-danger {
    background: linear-gradient(90deg, #e94560 0%, #ffd700 100%);
}

.hw-healthbar-label {
    position: relative;
    width: 100%;
    text-align: center;
    font-weight: 600;
    color: #fff;
    z-index: 2;
    font-size: 0.9em;
    text-shadow: 0 1px 4px #23243a;
    letter-spacing: 1px;
    pointer-events: none;
}

.hw-table-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto 2rem auto;
}

.missed-battles-section {
    margin-bottom: 2rem;
    padding: 1.5rem 1rem;
    border-radius: 14px;
    box-shadow: 0 2px 8px #181824;
    background: linear-gradient(120deg, #23243a 0%, #181824 100%);
    border: 1px solid #2e2e4d;
    color: #ffd700;
}

.missed-battles-table th,
.missed-battles-table td {
    padding: 10px 18px;
    font-size: 1.08em;
    color: #e0e6f6;
    background: transparent;
    border-bottom: 1px solid #2e2e4d;
    text-align: left;
}

.missed-battles-table th {
    color: #ffd700;
    font-weight: 600;
    text-shadow: 0 1px 4px #0f3460;
    border-bottom: 2px solid #ffd700;
}

.missed-battles-table tr:nth-child(even) td {
    background: rgba(36, 36, 60, 0.7);
}

.missed-battles-table tr:hover td {
    background: #23243a;
    color: #ffd700 !important;
    transition: background 0.2s, color 0.2s;
}

.missed-battles-table td:last-child,
.missed-battles-table th:last-child {
    text-align: center;
}

.hw-outcome-table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin-top: 24px;
}

.hw-outcome-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    background: linear-gradient(120deg, #23243a 0%, #181824 100%);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    table-layout: fixed;
}

.hw-outcome-table th, .hw-outcome-table td {
    min-width: 100px;
    max-width: 180px;
    box-sizing: border-box;
    padding: 8px 2px;
    text-align: left;
    color: #e0e6f6;
    background: transparent;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 1em;
    position: relative;
    border-bottom: 1px solid #2e2e4d;
}

.hw-outcome-table th {
    background: linear-gradient(90deg, #23243a 0%, #181824 100%);
    color: #ffd700;
    font-weight: 600;
    text-shadow: 0 1px 4px #0f3460;
    border-bottom: 2px solid #ffd700;
}

.hw-outcome-table tr:last-child td {
    border-bottom: none;
}

.hw-outcome-battles-cell {
    min-width: 30px;
    max-width: 80px;
    text-align: center;
    white-space: nowrap;
}

/* Sleek and modern style for Hydra Assignments table */
.table-striped th,
.table-striped td {
    padding-left: 24px;
    padding-right: 24px;
    background: transparent;
    border-bottom: 1px solid #2e2e4d;
    font-size: 1.08em;
    color: #e0e6f6;
    font-weight: 600;
}

.table-striped th {
    /*background: linear-gradient(90deg, #23243a 0%, #181824 100%);*/
    color: #ffd700;
    font-weight: 600;
    text-shadow: 0 1px 4px #0f3460;
    border-bottom: 2px solid #ffd700;
}

.table-striped tr:nth-child(even) td {
    background: rgba(36, 36, 60, 0.7);
}

.table-striped tr:hover td {
    background: #23243a;
    color: #ffd700 !important;
    transition: background 0.2s, color 0.2s;
}

.table-striped {
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Sleek and modern style for Estimated Outcome table */
.table-bordered th,
.table-bordered td {
    padding-left: 28px;
    padding-right: 28px;
    background: transparent;
    border-bottom: 1px solid #2e2e4d;
    font-size: 1.12em;
    color: #e0e6f6;
}

.table-bordered th {
    /*background: linear-gradient(90deg, #23243a 0%, #181824 100%);*/
    color: #ffd700;
    font-weight: 700;
    text-shadow: 0 1px 6px #0f3460;
    border-bottom: 2px solid #ffd700;
    letter-spacing: 1px;
}

.table-bordered tr:nth-child(even) td {
    background: rgba(36, 36, 60, 0.6);
}

.table-bordered tr:hover td {
    background: #23243a;
    color: #ffd700 !important;
    transition: background 0.2s, color 0.2s;
}

.table-bordered {
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.22);
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.hw-outcome-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hw-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #ffd700;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px #0f3460;
}

.hw-spinner {
    margin-top: 1.2rem;
    width: 48px;
    height: 48px;
    border: 6px solid #23243a;
    border-top: 6px solid #ffd700;
    border-radius: 50%;
    animation: hw-spin 1s linear infinite;
}

@keyframes hw-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Ensure QuickGrid header text matches .table-bordered and .missed-battles-table */
.hw-quickgrid th,
.hw-quickgrid th .col-title,
.hw-quickgrid th .col-title-text {
    background: #23243a; /* Solid color, no gradient */
    color: #ffd700 !important;
    font-weight: 600;
    text-shadow: 0 1px 4px #0f3460;
    border-bottom: 2px solid #ffd700;
    letter-spacing: 1px;
    font-size: 1em;
    padding: 8px 2px;
    border: none;
    box-shadow: none;
    white-space: nowrap;
}

.hw-outcome-table th,
.table-bordered th {
    text-align: center;
}

@media (max-width: 900px) {
    .hw-card {
        padding: 1.2rem 0.5rem;
    }
    .hw-title {
        font-size: 1.3rem;
    }

    .form-control label {
        max-width: 220px;
        padding-left: 0.1rem;
    }

    .hw-quickgrid th, .hw-quickgrid td, .hw-quickgrid td.col-justify-start {
        padding: 8px 2px;
        font-size: 0.95em;
        min-width: 60px;
        max-width: 120px;
        width: 14.28%;
    }
    .hw-quickgrid table {
        max-width: 100vw;
    }
    .hw-outcome-table th, .hw-outcome-table td {
        padding: 8px 2px;
        font-size: 0.95em;
        min-width: 60px;
        max-width: 120px;
    }
    .hw-outcome-table {
        max-width: 100vw;
    }

    .hw-outcome-battles-cell {
        min-width: 30px;
        max-width: 80px;
        font-size: 0.95em;
        padding: 8px 2px;
    }

    .hw-quickgrid th,
    .hw-quickgrid th .col-title,
    .hw-quickgrid th .col-title-text {
        font-size: 0.95em;
        padding: 8px 2px;
    }

    input[type="date"],
    input.input-time,
    select,
    .input-select {
        font-size: 0.95em;
        padding: 0.6rem;
        max-width: 220px;
    }
}

@media (max-width: 600px) {
    .hw-card {
        padding: 0.7rem 0.2rem;
        border-radius: 12px;
    }
    .hw-title {
        font-size: 1rem;
        margin-bottom: 0.7rem;
    }
    .form-control label {
        font-size: 0.95rem;
        max-width: 90vw;
        padding-left: 0.1rem;
    }
    input, select {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    .btn-primary {
        font-size: 0.95rem;
        padding: 0.6rem;
    }
    
    .hw-outcome-table th, .hw-outcome-table td, .table-bordered th, .table-bordered td {
        padding: 4px 2px !important;
        font-size: 0.6em !important;
        min-width: 80px !important;
        max-width: 100px !important;
    }

        .hw-outcome-table th.hw-outcome-health-cell,
        .hw-outcome-table td.hw-outcome-health-cell,
        .table-bordered th.hw-outcome-health-cell,
        .table-bordered td.hw-outcome-health-cell {
            min-width: 220px !important;
            max-width: 320px !important;
            font-size: 0.6em;
            white-space: normal;
        }

    .hw-outcome-center table {
        margin-left: auto;
        margin-right: auto;
        width: auto;
        max-width: 100%;
        display: table;
    }

    .missed-battles-table {
        min-width: 220px;
        max-width: 98vw;
        width: auto;
        margin-left: auto;
        margin-right: auto;
        display: table;
    }

        .missed-battles-table td.missed-battles-user {
            padding-left: 20px !important;
        }

    /* Optional: If you want to ensure the parent allows scrolling */
    .hw-outcome-center,
    .missed-battles-section {
        overflow-x: auto;
        width: 100%;
    }

    .hw-outcome-battles-cell {
        width: 6px;
        min-width: 6px !important;
        max-width: 30px !important;
        font-size: 0.6em !important;
        padding: 4px 0px !important;
    }

    .hw-healthbar-container {
        width: 160px;
        min-width: 160px;
        max-width: 240px;
    }

    .hw-quickgrid table {
        max-width: 100vw;
    }

    .hw-quickgrid th,
    .hw-quickgrid th .col-title,
    .hw-quickgrid th .col-title-text {
        font-size: 0.85em !important;
        padding: 2px 2px !important;
        min-width: 20px;
        max-width: 80px;
        width: auto !important;
    }

    .hw-quickgrid td,
    .hw-quickgrid td.col-justify-start {
        font-size: 0.6em !important;
        min-width: 20px !important;
        max-width: 80px !important;
        width: auto !important;
        padding: 2px 2px !important;
    }

        .hw-quickgrid td:first-child {
            padding-left: 8px !important;
        }

    .form-control label,
    input[type="date"],
    input.input-time,
    select,
    .input-select {
        max-width: 90vw; /* Use 90% of viewport width, but not 100% */
        min-width: 80px;
        font-size: 0.6em !important;
    }

    .hw-outcome-table th,
    .hw-outcome-table td,
    .table-bordered th,
    .table-bordered td,
    .table-striped th,
    .table-striped td,
    .missed-battles-table th,
    .missed-battles-table td {
        min-width: 40px !important;
        max-width: 80px !important;
        width: auto !important;
        padding: 2px 2px !important;
    }
}