@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #6b73ff 0%, #000dff 100%);
    --secondary-gradient: linear-gradient(135deg, #ff5b7f 0%, #ff1a1a 100%);
    --text-primary: #f0f0f0;
    --text-secondary: #c0c0c0;
    --background-dark: #1a1a2e;
    --background-light: #2a2a42;
    --glass-bg: rgba(25, 25, 35, 0.7);
    --card-bg: rgba(40, 40, 50, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--background-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.container {
    width: 90%;
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease both;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 2s ease-in-out infinite alternate;
}

/* ===== Overskrift for “Current Drinks Owed” ===== */
h2 {
    margin: 20px 0 10px;           /* Luft over og under */
    text-align: center;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideIn 1s ease both;
    font-size: 24px;
}

/* ===== Summary Box (Title + Liste) ===== */
.summary-box {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 4px 20px var(--shadow-color);
    width: 240px;                  /* Bredde på boksen (kan justeres) */
    max-width: 100%;
    margin: 20px auto;             /* Centrér boksen og giv luft over/under */
    animation: fadeInUp 0.8s ease both;
}

.summary-box h2 {
    font-size: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 2s ease-in-out infinite alternate;
    margin-bottom: 12px;  
    margin-top: 0px;         /* Luft mellem titel og liste */
    text-align: center;
}

.summary-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-box li {
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-primary);
}

/* ===== Completed Row Highlight ===== */
tr.completed {
    background-color: rgba(0, 128, 0, 0.2) !important;
}

tr.completed td {
    opacity: 0.9;
}

/* ===== Buttons ===== */
button {
    cursor: pointer;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    transition: transform 0.2s ease;
    animation: pulse 1.5s ease infinite;
}

/* Disable the pulse animation on the “View Full History” button */
#history-btn {
  animation: none !important;
}

button:hover {
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 15px;
    animation: fadeInUp 1s ease both;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: rgba(40, 40, 50, 1);
    color: var(--text-primary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: outline 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
    outline: 2px solid var(--primary-gradient);
}

/* ===== Table ===== */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px var(--shadow-color);
    animation: fadeInUp 1s ease both;
}

thead {
    background: rgba(25, 25, 35, 0.9);
}

th, td {
    padding: 20px;
    text-align: left;
    color: var(--text-primary);
}

tr:nth-child(even) {
    background: rgba(40, 40, 50, 0.8);
}

tr:hover {
    background: rgba(50, 50, 70, 0.8);
}

.actions button {
    margin-right: 10px;
    background: var(--secondary-gradient);
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-gradient);
    border-radius: 10px;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    from { text-shadow: 0 0 5px var(--primary-gradient); }
    to { text-shadow: 0 0 20px var(--primary-gradient); }
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes breathe {
    0% { box-shadow: 0 0 10px var(--shadow-color); }
    50% { box-shadow: 0 0 20px var(--shadow-color); }
    100% { box-shadow: 0 0 10px var(--shadow-color); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    th, td {
        padding: 15px 10px;
    }

    button {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Ved smallere skærm centrer boksen */
    .summary-box {
        width: 100%;
        margin: 20px auto 20px auto;
    }
}

/* ===== Login Screen ===== */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.login-form {
    background: var(--glass-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease both;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
}

.hidden {
    display: none;
}

select {
    background: rgba(25, 25, 35, 0.7);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    width: 100%;
    margin-top: 5px;
}

select:focus {
    outline: 2px solid var(--primary-gradient);
}

option {
    background: rgba(40, 40, 50, 1);
    color: var(--text-primary);
}

.complete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.complete-btn:disabled:hover {
    background: rgba(63, 73, 112, 0.7);
}

/* ===== Table Responsive Wrapper ===== */
.table-responsive {
    overflow-x: auto;
}
