:root {
    --background-color: #121212;
    --card-bg: #1a1a1a;
    --input-bg: #2a2a2a;
    --text-color: #e4e4e4;
    --secondary-text: #888888;
    --border-color: #333333;
    --overlay-bg: rgba(0, 0, 0, 0.8);
    --success-color: #00c851;
    --error-color: #ff4444;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Readex Pro", sans-serif;
    font-weight: 600;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

#loginSection {
    max-width: 400px;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

h4 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 15px;
    text-align: center;
}

h2,
h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.logged-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.logout-button {
    background-color: #ffffff;
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    width: auto;
    font-size: 0.9rem;
}

.logout-button:hover {
    background-color: #bdbdbd;
}

.points-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
}

.points-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.list-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.list-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    color: #000000;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.list-button:hover {
    transform: scale(1.1);
}

input {
    width: 100%;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 400;
    outline: none;
}

input:focus {
    outline: none;
}

input::placeholder {
    color: var(--secondary-text);
    opacity: 0.7;
    font-style: normal;
}

button {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 25px;
    background-color: #ffffff;
    color: var(--input-bg);
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #bdbdbd;
}

.remove-buttons-container {
    display: flex;
    gap: 1rem;
}

.remove-all-button {
    background-color: #ff4444;
    color: white;
}

.remove-all-button:hover {
    background-color: #ff6666;
}

.overlay,
.history-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--overlay-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup,
.history-popup {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    width: 575px;
    height: 700px;
    display: flex;
    flex-direction: column;
}

.points-list,
.history-popup-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-top: 1rem;
    width: 100%;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
}

.popup-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
    width: 100%;
}

.points-list {
    min-height: 300px;
}

.search-container {
    position: relative;
    flex-grow: 1;
    margin-right: 1rem;
}

.search-container input {
    padding-right: 3.5rem;
    margin-bottom: 0;
    height: 50px;
}

.search-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    filter: invert(1);
    width: 50px;
    height: 50px;
    padding: 10px;
}

.close-button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--input-bg);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.close-button img {
    background: none;
    width: 20px;
    height: 20px;
    filter: invert(1);
}

.close-button:hover {
    scale: 1.1;
    background: var(--input-bg);
}

.list-item,
.history-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    background: var(--card-bg);
    transition: background-color 0.2s;
    cursor: pointer;
}

.history-item:hover {
    background: var(--input-bg);
}

.list-item:last-child,
.history-item:last-child {
    border-bottom: none;
}

.message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem;
    border-radius: 10px;
    text-align: left;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: 400;
}

.message.hiding {
    opacity: 0;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.error {
    background-color: #ff4444;
    color: white;
}

.success {
    background-color: #00c851;
    color: white;
}

.history-section {
    margin-top: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.history-header h3 {
    margin: 0;
}

.expand-button {
    background: none;
    border: none;
    padding: 5px;
    width: auto;
    cursor: pointer;
    transition: transform 0.2s;
}

.expand-button:hover {
    transform: scale(1.1);
    background-color: #272727;
}

.expand-button img {
    filter: invert(1);
    opacity: 0.8;
}

.history-list {
    padding: 0.5rem 0;
}

.date-separator {
    padding: 0.8rem 1.5rem;
    background: var(--input-bg);
    color: var(--secondary-text);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.date-separator:first-child {
    margin-top: 0;
}

.history-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-color);
}

.history-item-left {
    text-align: left;
    flex: 1;
}

.history-item-right {
    text-align: right;
    color: var(--secondary-text);
    margin-left: 1rem;
}

.history-time {
    font-size: 0.85rem;
}

.copy-tooltip {
    position: fixed;
    background-color: #1a1a1a77;
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
}

.copy-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.copy-notification.hidden {
    display: none;
}

.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--overlay-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.confirmation-popup {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.confirmation-popup p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.confirmation-popup .username-display {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.confirmation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirmation-buttons button {
    width: auto;
    min-width: 120px;
    padding: 0.8rem 1.5rem;
}

.cancel-button {
    background-color: var(--error-color);
    color: white;
}

.cancel-button:hover {
    background-color: #ff2b2b;
}

.confirm-button {
    background-color: var(--success-color);
    color: white;
}

.confirm-button:hover {
    background-color: #009b34;
}

.icons-attribution {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--secondary-text);
}

.icons-attribution a {
    color: var(--secondary-text);
    text-decoration: none;
}

.icons-attribution a:hover {
    text-decoration: underline;
}

.login-help-text {
    text-align: center;
    font-size: 15px;
    margin-top: 15px;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .points-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .list-button-container {
        order: -1;
        margin-bottom: 1rem;
    }

    .points-box {
        padding: 1rem;
    }

    .popup,
    .history-popup {
        width: 95%;
        height: 90vh;
        padding: 1rem;
    }

    .list-button {
        width: 60px;
        height: 60px;
        font-size: 1rem;
    }

    input {
        font-size: 16px;
        padding: 0.6rem 0.8rem;
    }

    .logged-user {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .logout-button {
        width: 100%;
        max-width: 200px;
    }

    .search-container input {
        height: 40px;
    }

    .search-icon {
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .remove-buttons-container {
        flex-direction: column;
        gap: 0.5rem;
    }
}

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

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}