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

:root {
    --primary-color: #009F4D;
    --primary-dark: #007a3b;
    --secondary-color: #2b3d4f;
    --accent-color: #FFD700;
    --text-dark: #1a1a1a;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --input-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --button-shadow: 0 4px 15px rgba(0, 159, 77, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
}

/* Animated background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(0, 159, 77, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 215, 0, 0.1) 0%, transparent 30%);
    animation: backgroundFloat 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes backgroundFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(-2%, -2%) rotate(1deg);
    }

    50% {
        transform: translate(0%, 1%) rotate(0deg);
    }

    75% {
        transform: translate(2%, -1%) rotate(-1deg);
    }
}

/* Floating shapes */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-shapes span {
    position: absolute;
    display: block;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: floatUp 15s linear infinite;
}

.floating-shapes span:nth-child(1) {
    left: 10%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 20s;
}

.floating-shapes span:nth-child(2) {
    left: 20%;
    width: 40px;
    height: 40px;
    animation-delay: 2s;
    animation-duration: 18s;
}

.floating-shapes span:nth-child(3) {
    left: 35%;
    width: 30px;
    height: 30px;
    animation-delay: 4s;
}

.floating-shapes span:nth-child(4) {
    left: 50%;
    width: 90px;
    height: 90px;
    animation-delay: 0s;
    animation-duration: 25s;
}

.floating-shapes span:nth-child(5) {
    left: 65%;
    width: 50px;
    height: 50px;
    animation-delay: 6s;
}

.floating-shapes span:nth-child(6) {
    left: 80%;
    width: 70px;
    height: 70px;
    animation-delay: 3s;
    animation-duration: 22s;
}

.floating-shapes span:nth-child(7) {
    left: 90%;
    width: 35px;
    height: 35px;
    animation-delay: 8s;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

h1 {
    font-weight: 700;
    margin: 0;
    font-size: 2rem;
    color: var(--secondary-color);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-weight: 600;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

p {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.3px;
    margin: 15px 0 20px;
    color: var(--text-light);
}

span {
    font-size: 13px;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Main Button Styles */
button {
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 50px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--button-shadow);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 159, 77, 0.5);
}

button:active {
    transform: translateY(-1px) scale(0.98);
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 159, 77, 0.3), var(--button-shadow);
}

button a {
    color: #fff;
    text-decoration: none;
}

button.ghost {
    background: transparent;
    border: 2px solid #ffffff;
    box-shadow: none;
}

button.ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Form Styles */
form {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 50px 40px;
    text-align: center;
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    border-radius: 24px;
}

/* Input Styles */
input {
    background: #f5f7fa;
    border: 2px solid transparent;
    padding: 16px 20px;
    margin: 10px 0;
    width: 100%;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: var(--input-shadow);
}

input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 159, 77, 0.1), var(--input-shadow);
}

input:hover:not(:focus) {
    border-color: #e5e7eb;
    background: #fff;
}

/* Container Styles */
.container {
    background: var(--glass-bg);
    border-radius: 30px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    min-height: 600px;
    display: flex;
    flex-direction: row;
    z-index: 1;
    border: 1px solid var(--glass-border);
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show {

    0%,
    49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

/* Overlay Container */
.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: linear-gradient(135deg, var(--primary-color) 0%, #007a3b 50%, #16213e 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
    color: #ffffff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-panel h1 {
    color: #fff;
    -webkit-text-fill-color: #fff;
    background: none;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.overlay-panel p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.7;
    max-width: 280px;
}

.overlay-left {
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

/* Social/Logo Container */
.social-container {
    margin: 0 0 25px 0;
}

.social-container a {
    border: none;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    height: 70px;
    width: 70px;
    transition: all 0.3s ease;
}

.social-container a img {
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.social-container a:hover img {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

/* Brand name styling */
.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 12px;
    letter-spacing: -0.5px;
}

/* Footer */
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px 20px;
    text-align: center;
    margin-top: auto;
    z-index: 1;
}

footer p {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

footer a {
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--accent-color);
}

footer i.fa-heart {
    color: #ef4444;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Divider styling */
.divider {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

.divider span {
    padding: 0 15px;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
}

/* Donate button styling */
.donate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    margin-top: 10px;
}

.donate-btn:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5) !important;
}

/* ================================================================
   MOBILE RESPONSIVE STYLES
   ================================================================ */

/* Mobile First: Base mobile styles (up to 767px) */
@media (max-width: 767px) {
    body {
        padding: 15px;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 30px;
    }

    .container {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        min-height: auto;
        height: auto;
        border-radius: 24px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
        margin: 0;
    }

    .form-container {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        padding: 0;
        left: 0 !important;
    }

    .sign-in-container {
        display: block !important;
        opacity: 1 !important;
        z-index: 2 !important;
    }

    .sign-up-container {
        display: none;
    }

    /* Show sign-up form when active on mobile */
    .container.right-panel-active .sign-in-container {
        display: none !important;
        transform: none !important;
    }

    .container.right-panel-active .sign-up-container {
        display: block !important;
        position: relative !important;
        transform: none !important;
        opacity: 1 !important;
        z-index: 5 !important;
        animation: fadeIn 0.4s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .overlay-container {
        display: none !important;
    }

    form {
        padding: 35px 25px;
        border-radius: 24px;
        max-width: 100%;
        width: 100%;
    }

    h1 {
        font-size: 1.75rem;
    }

    input {
        padding: 14px 16px;
        font-size: 16px;
        /* Prevents zoom on iOS */
        margin: 8px 0;
    }

    button {
        padding: 14px 40px;
        font-size: 13px;
        width: 100%;
        max-width: 280px;
    }

    .social-container a {
        height: 60px;
        width: 60px;
    }

    .social-container a img {
        width: 55px !important;
        height: 55px !important;
    }

    .brand-name {
        font-size: 24px;
    }

    /* Mobile toggle panel */
    .mobile-toggle-panel {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        padding: 25px 20px;
        border-radius: 0 0 24px 24px;
        margin-top: -5px;
    }

    .mobile-toggle-panel p {
        color: rgba(255, 255, 255, 0.9);
        margin: 0 0 15px 0;
        font-size: 14px;
    }

    .mobile-toggle-panel button {
        background: transparent;
        border: 2px solid #fff;
        padding: 12px 35px;
        box-shadow: none;
    }

    .mobile-toggle-panel button:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    footer {
        padding: 20px 15px;
    }

    footer p {
        font-size: 13px;
    }
}

/* Small phones (up to 375px) */
@media (max-width: 375px) {
    body {
        padding: 10px;
    }

    form {
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .brand-name {
        font-size: 22px;
    }

    button {
        padding: 12px 30px;
        font-size: 12px;
    }

    .social-container a {
        height: 55px;
        width: 55px;
    }

    .social-container a img {
        width: 50px !important;
        height: 50px !important;
    }
}

/* Tablet styles (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    body {
        padding: 30px;
    }

    .container {
        width: 95%;
        max-width: 700px;
        min-height: 550px;
    }

    form {
        padding: 40px 35px;
    }

    .overlay-panel {
        padding: 0 30px;
    }

    .overlay-panel h1 {
        font-size: 1.8rem;
    }

    .overlay-panel p {
        font-size: 14px;
    }

    /* Hide mobile toggle on tablet */
    .mobile-toggle-panel {
        display: none !important;
    }
}

/* Desktop styles (1024px and above) */
@media (min-width: 1024px) {
    body {
        padding: 40px;
    }

    .container {
        width: 900px;
        min-height: 620px;
    }

    form {
        padding: 50px 45px;
    }

    h1 {
        font-size: 2.2rem;
    }

    .overlay-panel h1 {
        font-size: 2.4rem;
    }

    /* Hide mobile toggle on desktop */
    .mobile-toggle-panel {
        display: none !important;
    }
}

/* Large screens (1200px and above) */
@media (min-width: 1200px) {
    .container {
        width: 950px;
        min-height: 650px;
    }

    form {
        padding: 55px 50px;
    }

    .brand-name {
        font-size: 30px;
    }
}

/* Landscape mode on mobile */
@media (max-width: 767px) and (orientation: landscape) {
    body {
        padding: 15px;
        min-height: 100vh;
    }

    .container {
        max-height: none;
    }

    form {
        padding: 25px 30px;
    }

    .social-container {
        margin-bottom: 15px;
    }

    .social-container a {
        height: 50px;
        width: 50px;
    }

    .social-container a img {
        width: 45px !important;
        height: 45px !important;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    input {
        padding: 12px 15px;
        margin: 6px 0;
    }

    button {
        padding: 12px 35px;
    }
}

/* ================================================================
   ACCESSIBILITY & INTERACTION ENHANCEMENTS
   ================================================================ */

/* Focus states for accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-shapes span {
        animation: none !important;
    }

    body::before {
        animation: none !important;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(30, 30, 45, 0.95);
    }

    form {
        background: var(--glass-bg);
    }

    input {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        border-color: rgba(255, 255, 255, 0.1);
    }

    input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    input:focus {
        background: rgba(255, 255, 255, 0.15);
        border-color: var(--primary-color);
    }

    h1 {
        -webkit-text-fill-color: #fff;
        background: linear-gradient(135deg, #fff, var(--primary-color));
        -webkit-background-clip: text;
    }

    .brand-name {
        -webkit-text-fill-color: #fff;
        background: linear-gradient(135deg, #fff, var(--primary-color));
        -webkit-background-clip: text;
    }

    span,
    p {
        color: rgba(255, 255, 255, 0.7);
    }
}

/* Print styles */
@media print {
    body {
        background: #fff;
    }

    body::before,
    .floating-shapes {
        display: none;
    }

    .container {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    button {
        display: none;
    }

    .overlay-container {
        display: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    input {
        border: 2px solid var(--text-dark);
    }

    button {
        border: 2px solid currentColor;
    }
}