/* Root Variables */
:root {
    --primary-gradient: linear-gradient(to right, #141e30, #243b55); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    --secondary-gradient: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
    --text-primary: #fff;
    --text-secondary: #64748b;
    --button-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(to right, #141e30, #243b55); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    min-height: 100vh;
    font-family: 'Roboto Condensed', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

h1 {
  font-size: 25px;
}

.site-header-alt {
    text-align: center;
    opacity: 0;
    animation: headerAppear 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.site-header-alt h1 {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 2.75rem;
    margin: 0;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.site-header-alt h1::before,
.site-header-alt h1::after {
    content: 'PrisonWidgets';
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    color: #fff;
}

.site-header-alt h1::before {
    left: 2px;
    text-shadow: -2px 0 #f46b45;
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
    background: none;
    -webkit-text-fill-color: initial;
}

.site-header-alt h1::after {
    left: -2px;
    text-shadow: 2px 0 #2C74B3;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
    animation-delay: 1s;
    background: none;
    -webkit-text-fill-color: initial;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(40% 0 61% 0);
    }
    20% {
        clip-path: inset(92% 0 1% 0);
    }
    40% {
        clip-path: inset(43% 0 1% 0);
    }
    60% {
        clip-path: inset(25% 0 58% 0);
    }
    80% {
        clip-path: inset(54% 0 7% 0);
    }
    100% {
        clip-path: inset(58% 0 43% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(24% 0 29% 0);
    }
    20% {
        clip-path: inset(54% 0 21% 0);
    }
    40% {
        clip-path: inset(31% 0 58% 0);
    }
    60% {
        clip-path: inset(86% 0 4% 0);
    }
    80% {
        clip-path: inset(18% 0 71% 0);
    }
    100% {
        clip-path: inset(95% 0 5% 0);
    }
}

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

@keyframes headerScale {
  0% {
    transform: scale(0.8);
  }
  100% {
    transform: scale(1);
  }
}

.login-page {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding: 2rem;
    position: relative;
}

@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
        visibility: hidden;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
}

@keyframes formFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
        visibility: hidden;
    }
}

/* Form transitions */
.register-form,
.login-form {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.register-form.active,
.login-form.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: formFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.register-form:not(.active),
.login-form:not(.active) {
    animation: formFadeOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Update form container styles */
.form {
    position: relative;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    isolation: isolate;
    overflow: hidden;
    min-height: auto;
}

.form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    transition: all 0.6s ease;
    pointer-events: none;
}

.input-group {
    position: relative;
    width: 100%;
    margin-bottom: 1.75rem;
}

.input-group:last-of-type {
    margin-bottom: 2rem;
}

.input-group svg {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 2;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form input {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: white;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.125rem 1.25rem 1.125rem 3.25rem;
    border-radius: 14px;
    outline: none;
    box-sizing: border-box;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
}

.form input:hover {
    background: rgba(20, 24, 40, 0.95);
    border-color: rgba(58, 123, 213, 0.3);
}

.form input:focus {
    background: rgba(20, 24, 40, 1);
    border-color: rgba(58, 123, 213, 0.8);
    box-shadow: 
        0 0 0 4px rgba(58, 123, 213, 0.15),
        inset 0 0 0 1px rgba(58, 123, 213, 0.4);
}

.form input:focus + svg {
    stroke: #3a7bd5;
    transform: translateY(-50%) scale(1.1);
}

.form input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

.form button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(90deg, 
        rgba(33, 147, 176, 0.9) 0%,
        rgba(33, 147, 176, 1) 20%,
        rgba(33, 147, 176, 1) 80%,
        rgba(33, 147, 176, 0.9) 100%
    );
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-family: inherit;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    box-shadow: 
        inset 0 -2px 0 rgba(0,0,0,0.3),
        inset 0 2px 0 rgba(255,255,255,0.5),
        0 4px 6px rgba(0, 0, 0, 0.2);
    text-shadow:
        0 -1px 0px rgba(0, 0, 0, 0.2),
        0 2px 0px rgba(0, 0, 0, 0.2), 
        0 4px 0px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    margin-bottom: 1rem;
}

.form button:hover {
    transform: translateY(-2px);
    box-shadow: 
        inset 0 -2px 0 rgba(0,0,0,0.3),
        inset 0 2px 0 rgba(255,255,255,0.5),
        0 8px 16px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

.form button:active {
    transform: translateY(1px);
    box-shadow: 
        inset 0 -1px 0 rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.5),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

.message-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    padding: 0.5rem;
    gap: 0.75rem;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.message-row span {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.message-row a {
    color: #00d2ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(58, 123, 213, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(58, 123, 213, 0.2);
}

.message-row a::after {
    display: none;
}

.message-row a:hover {
    color: #fff;
    background: rgba(58, 123, 213, 0.2);
    border-color: rgba(58, 123, 213, 0.4);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.05);
}

.message-row a:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* Form error message styling */
.form p {
    width: 100%;
    margin: 0 0 2rem;
    padding: 1.125rem 1.5rem;
    border-radius: 14px;
    background: linear-gradient(135deg, 
        rgba(239, 83, 80, 0.95) 0%, 
        rgba(229, 115, 115, 0.95) 100%
    );
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    box-shadow: 
        0 4px 8px rgba(239, 83, 80, 0.2),
        0 2px 4px rgba(239, 83, 80, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@media (max-width: 480px) {
    .login-page {
        padding: 1.5rem;
        gap: 2rem;
    }

    .form {
        padding: 2rem 1.5rem;
    }

    .form input {
        padding: 1rem 1.25rem 1rem 3rem;
        font-size: 0.95rem;
    }

    .form button {
        padding: 1rem;
    }

    .message-row {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding: 0.75rem;
        margin-top: 0;
        background: rgba(255, 255, 255, 0.05);
    }

    .message-row a {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
    }
}