html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

html::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

html::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
    pointer-events: none;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    font-family: Arial, sans-serif;
    background-color: transparent;
    overflow-y: auto;
    z-index: 2;
}
}

/* Ko-Fi widget - disabled in Android app */
#kofi-settings,
#kofi-setup {
    display: none !important;
}

/* Custom donate button */
.donate-btn {
    background: linear-gradient(135deg, #72a4f2 0%, #5a8ee8 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(114, 164, 242, 0.4);
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 164, 242, 0.6);
}

.donate-btn:active {
    transform: translateY(0);
}

.container {
    display: flex;
    height: calc(100vh - 100px);
    margin-top: 100px;
    overflow-y: auto;
}

.column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.maincontent {
    display: flex;
}

.divider {
    width: 2px;
    background-color: black;
}

.row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px 0;
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
}

.row h2 {
    cursor: text;
    user-select: text;
    pointer-events: auto;
}

h1, h2, button {
    color: white;
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black;
}

#settingsDiv h2{
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0px 0px;
    padding-bottom: 5px;
}

.row{
    color: white;
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black;
}

.menu button {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 4px;
    font-size: 16px;
    background-color: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    width: 40px !important;
    height: 40px;
}

.menu button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

button {
    font-size: 16px;
    background-color: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.menu button, 
button:not(.row button) {
    width: auto;
    padding: 10px 20px;
    font-size: 16px;
    background-color: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu button:hover, 
button:not(.row button):hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.row span {
    font-size: 24px;
    font-weight: bold;
    padding-left: 15px;
    padding-right: 15px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes floatUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-50px);
    }
}

.float-up {
    position: absolute;
    color: white;
    font-size: 20px;
    font-weight: bold;
    animation: floatUp 1s ease-out;
    pointer-events: none;
}

#playerNames div:hover span,
#playerNames div:hover i {
    color: green;
    cursor: pointer;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: black;
    padding: 10px 20px;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}

.header-icon {
    width: 36px;
    height: 36px;
    border-radius: 5px;
    object-fit: cover;
}

.header-text {
    height: 40px;
    object-fit: contain;
    max-width: calc(100% - 50px);
    flex-shrink: 1;
}

header h1 {
    margin: 0;
    font-size: 24px;
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: cyan;
    text-align: left;
}

.menu {
    display: flex;
    gap: 10px;
    padding-right: 30px !important;
    flex-shrink: 0;
}

/* Player Names */
#playerNames {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 50px;
    left: 0;
    width: 100%;
    padding: 5px;
    z-index: 1000;
    color: white;
    pointer-events: none;
    font-size: 22px;
    background-color: rgba(0, 0, 0, 0.9);
}

#playerNames div {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
    flex: 1;
    pointer-events: auto;
}

#playerNames span {
    cursor: text;
    text-decoration: underline;
}

/* Setup Div */
#setupDiv {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    overflow-y: auto;
    visibility: visible;
    opacity: 1;
}

#setupDiv h1 {
    color: white;
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black;
    margin-bottom: 20px;
}

#setupDiv input {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid white;
    margin-bottom: 10px;
    font-size: 16px;
    color: black;
}

#setupDiv button {
    padding: 10px 10px;
    font-size: 16px;
    background-color: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

#setupDiv button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#setupDiv .button-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

/* Timer */
#timer {
    position: fixed;
    left: 50%;
    transform: translate(-50%, 0%);
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black;
    cursor: pointer;
    user-select: none;
}

/* Timer styles */
.timer {
    position: fixed;
    left: 50%;
    transform: translate(-50%, 0%);
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black;
    cursor: pointer;
    user-select: none;
}

.timer.red {
    color: red;
    animation: blink 1s infinite;
}

.timer-input {
    position: fixed;
    left: 50%;
    transform: translate(-50%,0%);
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    width: 120px;
    background-color: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 5px;
}

.timer-label {
    color: white;
    font-weight: bold;
    cursor: text;
    margin: 0 8px;
}

/* Notes Form */
#notesForm {
    display: none;
    width: 100%;
    height: 100%;
    color: white;
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 100px;
    box-sizing: border-box;
}

#notesForm::-webkit-scrollbar {
    width: 8px;
}

#notesForm::-webkit-scrollbar-thumb {
    background-color: white;
    border-radius: 4px;
}

#notesForm::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.2);
}

#notesForm h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 30px;
    font-weight: bold;
    padding-top: 350px;
    color: white;
}

#notesForm label {
    font-size: 14px;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
    display: inline-flex;
}

#notesForm input,
#notesForm textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid white;
    font-size: 14px;
    color: black;
    background-color: white;
}

#notesForm textarea {
    resize: none;
    height: 80px;
}

#notesForm div {
    margin-bottom: 10px;
}

#notesForm button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
}

#notesForm button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#settingsDiv {
    display: none;
    position: fixed;
    top: 50% !important;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: black !important;
    padding: 20px;
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    width: 300px;
    max-width: 90%;
}

.settings-footer {
    margin-top: 20px;
    font-size: 12px;
    text-align: center;
    color: gray;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* General Label Styles */
label {
    font-size: 16px;
    color: white;
    font-weight: bold;
    margin-bottom: 5px;
    display: inline-flex;
}

.life-adjust {
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
    margin: 0 4px !important;
    border-radius: 5px !important;
    border: 2px solid white;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: none;
}

.life-adjust:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #72a4f2;
    border-color: #72a4f2;
}

#setupDiv > div {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
#setupDiv label {
    min-width: 90px;
    margin-right: 8px;
    text-align: right;
}
#setupDiv input[type="number"],
#setupDiv input[type="text"] {
    width: 60px;
    text-align: center;
    padding: 6px;
    font-size: 1rem;
    margin: 0 4px;
}

.player-name-editable {
    color: white;
    font-weight: bold;
    cursor: text;
    text-decoration: underline;
    margin: 0 8px;
}

.header-image-wrapper {
    padding: 16px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* Print Styles */
@media print {
    body {
        background: none;
        color: black;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    #setupDiv, #settingsDiv, .menu, #timer, button, .fas{
        display: none !important;
    }

    #maincontent {
        display: block;
        width: 50%;
        margin: 0;
        padding: 10px;
    }

    #playerNames {
        display: flex;
        width: 50%;
        margin: 0;
        padding: 10px;
    }

    .leftHeader, .rightHeader, span, .row{
        color: black !important;
        text-shadow:none; 
    }

    .container, .leftcolumn, .rightcolumn {
        align-items: flex-start !important;
    }
    #notesForm {
        display: block;
        width: 50%;
        margin: 0;
        padding: 10px;
    }
    #notesForm h2 {
        text-align: center;
        margin-bottom: 15px;
        font-size: 30px;
        padding-top: 0px;
        color: black;
        text-shadow:none; 
    }

    .row {
        color: black !important;
        text-shadow: none !important;
    }
}

.preset-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}
.preset-row button {
    padding: 10px 16px;
    font-size: 15px;
    background-color: transparent;
    color: white;
    border: 2px solid #72a4f2;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.preset-row button:hover {
    background: #72a4f2;
    color: black;
    border-color: #fff;
}
