/* Global Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #fff;
}

/* Animated Background */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(50px);
    opacity: 0.6;
    animation: float 20s infinite;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #ff6b6b;
    border-radius: 50%;
    animation-delay: 0s;
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: #4ecdc4;
    border-radius: 50%;
    animation-delay: -5s;
}

.shape-3 {
    top: 20%;
    right: 20%;
    width: 300px;
    height: 300px;
    background: #ffe66d;
    border-radius: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Glassmorphism Container */
.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
    /* Animation delay handled below */
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 3.8s backwards;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

h1 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Form Elements */
label {
    display: block;
    text-align: left;
    margin: 15px 0 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-sizing: border-box;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin: 20px 0 30px;
    cursor: pointer;
}

.checkbox-group input {
    margin-right: 10px;
    accent-color: #ff6b6b;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #fff;
}

/* Animated Background */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(50px);
    opacity: 0.6;
    animation: float 20s infinite;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #ff6b6b;
    border-radius: 50%;
    animation-delay: 0s;
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: #4ecdc4;
    border-radius: 50%;
    animation-delay: -5s;
}

.shape-3 {
    top: 20%;
    right: 20%;
    width: 300px;
    height: 300px;
    background: #ffe66d;
    border-radius: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Glassmorphism Container */
.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
    /* Animation delay handled below */
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 3.8s backwards;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

h1 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Form Elements */
label {
    display: block;
    text-align: left;
    margin: 15px 0 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-sizing: border-box;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin: 20px 0 30px;
    cursor: pointer;
}

.checkbox-group input {
    margin-right: 10px;
    accent-color: #ff6b6b;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

button:active {
    transform: translateY(0);
}

.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.2);
    color: #ffcccc;
    padding: 10px;
    border-radius: 5px;
    margin-top: 20px;
    font-size: 14px;
    animation: shake 0.5s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 30px;
        margin: 20px;
    }

    h1 {
        font-size: 24px;
    }
}

/* Intro Animation */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeOut 0.8s ease-in-out 3s forwards;
    pointer-events: none;
}

.botfather-logo {
    width: 60vmin;
    max-width: 600px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(100, 200, 255, 0.4));
    animation: logoIntro 3.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes logoIntro {
    0% {
        opacity: 0;
        transform: scale(0.1) rotateY(180deg);
        filter: drop-shadow(0 0 0px rgba(100, 200, 255, 0));
    }

    40% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
        filter: drop-shadow(0 0 50px rgba(100, 200, 255, 0.8));
    }

    80% {
        opacity: 1;
        transform: scale(1.1) rotateY(0deg);
    }

    100% {
        opacity: 0;
        transform: scale(3);
        filter: drop-shadow(0 0 100px rgba(100, 200, 255, 0));
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Delay container appearance to overlap slightly with logo exit */
.container {
    animation: popIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 2.8s backwards;
}