* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: #fff;
    color: #000;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.875rem;
    color: #666;
    transition: color 0.3s ease;
}

body.dark-mode .subtitle {
    color: #999;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

button {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.75rem 2rem;
    background-color: #000;
    color: #fff;
    border: 2px solid #000;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.dark-mode button {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

button:hover {
    background-color: #fff;
    color: #000;
    border-color: #000;
}

body.dark-mode button:hover {
    background-color: #000;
    color: #fff;
    border-color: #fff;
}

footer {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.75rem;
    color: #999;
    transition: color 0.3s ease;
}

body.dark-mode footer {
    color: #666;
}

.login_area {
    border: 2px dotted #000;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    width: 100%;
}

.login_area h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login_area label {
    font-size: 0.875rem;
    font-weight: 700;
}

.login_area input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    padding: 0.75rem;
    border: 2px solid #000;
    background-color: #fff;
    color: #000;
    transition: all 0.2s ease;
}

.login_area input:focus {
    outline: none;
    border-color: #000;
}

.login_button {
    background-color: #000;
    color: #fff;
    border: 2px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login_button::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('login.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(1);
    transition: filter 0.2s ease;
}

.login_button:hover {
    background-color: #fff;
    color: #000;
}

.login_button:hover::before {
    filter: invert(0);
}

.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.5rem 0;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #000;
}

.separator::before {
    margin-right: 1rem;
}

.separator::after {
    margin-left: 1rem;
}

.separator span {
    font-size: 0.75rem;
    color: #666;
    font-weight: 700;
}

.create_button {
    background-color: transparent;
    color: #000;
    border: 2px solid #000;
    transition: all 0.3s ease;
}

.create_button:hover {
    background-color: rgba(0, 0, 0, 0.08);
    color: #000;
}

.signup_button {
    background-color: #000;
    color: #fff;
    border: 2px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.signup_button::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('signup.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(1);
    transition: filter 0.2s ease;
}

.signup_button:hover {
    background-color: #fff;
    color: #000;
}

.signup_button:hover::before {
    filter: invert(0);
}

.signin_instead_button {
    background-color: transparent;
    color: #000;
    border: 2px solid #000;
    transition: all 0.3s ease;
}

.signin_instead_button:hover {
    background-color: rgba(0, 0, 0, 0.08);
    color: #000;
}

/* Animation keyframes */
@keyframes fadeInMove {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation classes for staggered fade-in */
.login_area > *:nth-child(1) {
    animation: fadeInMove 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0s;
}

.login_area > *:nth-child(2) {
    animation: fadeInMove 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.05s;
}

.login_area > *:nth-child(3) {
    animation: fadeInMove 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.1s;
}

.login_area > *:nth-child(4) {
    animation: fadeInMove 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.15s;
}

.login_area > *:nth-child(5) {
    animation: fadeInMove 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
}

.login_area > *:nth-child(6) {
    animation: fadeInMove 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.25s;
}

/* Start elements invisible, they will fade in on load */
.login_area > * {
    opacity: 0;
}

.login_area.hiding > * {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

/* Panel styles */
.panel_welcome {
    border: 2px dotted #000;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.panel_welcome h2 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.invited_text {
    font-size: 0.75rem;
    color: #666;
}

.panel_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 600px;
    width: 100%;
}

.panel_box {
    border: 2px dotted #000;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.panel_box h3 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.days_left {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.extend_button,
.download_button,
.management_button {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    background-color: #000;
    color: #fff;
    border: 2px solid #000;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.extend_button:hover,
.download_button:hover,
.management_button:hover {
    background-color: #fff;
    color: #000;
}

.info_links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info_link {
    font-size: 0.75rem;
    color: #000;
    text-decoration: underline;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.info_link:hover {
    opacity: 0.6;
}

.button_spacer {
    height: calc(0.75rem + 0.25rem + 0.25rem);
}

.logout_container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: -1rem;
}

.logout_button {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 2rem;
    background-color: #000;
    color: #fff;
    border: 2px solid #000;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout_button:hover {
    background-color: #fff;
    color: #000;
}