body {
    background-color: #0d0d0d;
    font-family: 'Bebas Neue', sans-serif;
    color: white;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:40px 0;
    min-height:100vh;
    height:auto;
    margin:0;
}

.card {
    background-color:#1a1a1a;
    padding: 40px;
    border-radius: 16px;
    border: 2px solid #FF4500;
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.4);
    text-align: center;
    min-width: 300px;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card.running{
    border: 2px solid red;
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.8);
}

.card.paused{
    border: 2px solid #FFD700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
}

.card.break {
    border: 2px solid #FF4500;
    box-shadow: 0 0 25px rgba(255, 69, 0, 0.8);
}

#timer {
    font-size: 100px;
    font-weight: bold;
    color:white;
    margin: 20px 0;
    letter-spacing: 2px;
}

#mode {
    font-size: 28px;
    color: #FF4500;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

button {
    background-color:#FF4500;
    color:white;
    border:none;
    border-radius: 10px;
    padding: 12px 20px;
    margin: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    cursor:pointer;
    transition: 0.2s ease;
    min-width: 90px;
}

button:hover {
    background-color:#FFD700;
    color:black;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

input {
    background-color:#0d0d0d;
    color:white;
    border: 2px solid #FF4500;
    border-radius: 10px;
    padding:10px;
    margin:5px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    width: 80px;
    outline:none;
}

input:focus {
    border-color: #FFD700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

h1 {
    color:white;
    text-align:center;
    font-size: 48px;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

p {
    color:#ccc;
    text-align:center;
    font-size: 18px;
    margin-bottom: 20px;
}

.container {
    display:flex;
    flex-direction:column;
    align-items:center;
    width: min(92vw, 720px);
    gap: 22px;
}

#sessionCount {
    font-size: 22px;
    color: #FFD700;
    letter-spacing: 1px;
    margin-top: 15px;
}

input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    filter: blur(40px);
}
.overlay.red{
    background: linear-gradient(to top, rgba(255, 0, 0, 0.25), rgba(255, 0, 0, 0.1), transparent);
    opacity: 1;
}
.overlay.yellow{
    background: linear-gradient(to top, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.1), transparent);
    opacity: 1;
}

.overlay.orange{
    background: linear-gradient(to top, rgba(255, 69, 0, 0.25), rgba(255, 69, 0, 0.1), transparent);
    opacity: 1;
}

.input-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

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

.reset-row {
    display: flex;
    justify-content: center;
}

#reset {
    background-color: transparent;
    color: #FF4500;
    border: 2px solid #FF4500;
}

#reset:hover {
    background-color: #FF4500;
    color: white;
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.6);
}

.input-row, .button-row, .reset-row {
    width: 100%;
}

.auth-panel,
.leaderboard-panel {
    width: min(100%, 520px);
    border: 2px solid #333;
    border-radius: 12px;
    background: #151515;
    padding: 18px;
    box-sizing: border-box;
    text-align: center;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.tab {
    min-width: 0;
    background: transparent;
    border: 2px solid #FF4500;
    color: #FF4500;
}

.tab.active,
.tab:hover {
    background: #FF4500;
    color: white;
}

.auth-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
}

.auth-form input {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.auth-form button {
    margin: 0;
    width: 100%;
}

#registerForm {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hidden {
    display: none !important;
}

.status-message {
    min-height: 22px;
    margin: 12px 0 0;
    color: #FFD700;
}

.status-message.error {
    color: #ff6b6b;
}

#profileText {
    margin: 0 0 10px;
    color: #FFD700;
    letter-spacing: 1px;
}

.leaderboard-panel h2 {
    margin: 0 0 12px;
    color: #FF4500;
    letter-spacing: 2px;
}

#leaderboard {
    list-style-position: inside;
    padding: 0;
    margin: 0;
}

#leaderboard li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 12px;
    border-top: 1px solid #2b2b2b;
    color: #eee;
    font-size: 20px;
    letter-spacing: 1px;
}

#leaderboard li:first-child {
    border-top: 0;
}

#leaderboard strong {
    color: #FFD700;
    font-weight: normal;
}

@media (max-width: 680px) {
    body {
        padding: 24px 0;
    }

    h1 {
        font-size: 40px;
    }

    .card {
        width: 100%;
        box-sizing: border-box;
        min-width: 0;
        padding: 28px 18px;
    }

    #timer {
        font-size: 72px;
    }

    .input-row,
    .button-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .auth-form,
    #registerForm {
        grid-template-columns: 1fr;
    }
}
