/* ======================= Log in Section ============================================= */

/* Animierte Hintergrund-Elemente */
.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 15s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -50px;
    animation-delay: 3s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    bottom: -100px;
    left: 30%;
    animation-delay: 6s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    top: 20%;
    right: 20%;
    animation-delay: 9s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-50px) rotate(180deg);
    }
}

/* Main Container */
.login-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-wrapper {
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Side - Info Section */
.login-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-info::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    left: -100px;
    animation: pulse 4s ease-in-out infinite;
}

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

.info-content {
    position: relative;
    z-index: 2;
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-content h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 20px;
    font-weight: 800;
}

.info-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 40px;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: white;
    animation: slideInLeft 0.8s ease-out backwards;
}

.feature-item:nth-child(1) {
    animation-delay: 0.2s;
}

.feature-item:nth-child(2) {
    animation-delay: 0.4s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.6s;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feature-text p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* Right Side - Login Form */
.login-form-section {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-header {
    margin-bottom: 35px;
    text-align: center;
}

.form-header h3 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p {
    color: #718096;
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.remember-me label {
    color: #4a5568;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
}

.btn-login {
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.btn-login::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;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
}

.divider span {
    color: #a0aec0;
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

/* BASE BUTTON */
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 14px 16px;
    border-radius: 14px;

    background: #ffffff;
    border: 1.5px solid #e2e8f0;

    font-weight: 600;
    font-size: 14px;
    color: #1a202c;
    text-decoration: none;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

/* ICON */
.social-btn .icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* GOOGLE */
.social-btn.google .icon {
    background: #fde8e8;
    color: #db4437;
}

.social-btn.google:hover {
    border-color: #db4437;
    box-shadow: 0 10px 25px rgba(219, 68, 55, 0.18);
    transform: translateY(-3px);
}

/* FACEBOOK */
.social-btn.facebook .icon {
    background: #e8f0fe;
    color: #4267b2;
}

.social-btn.facebook:hover {
    border-color: #4267b2;
    box-shadow: 0 10px 25px rgba(66, 103, 178, 0.2);
    transform: translateY(-3px);
}

/* ACTIVE / CLICK */
.social-btn:active {
    transform: translateY(-1px);
}

/* MOBILE */
@media (max-width: 480px) {
    .social-login {
        grid-template-columns: 1fr;
    }
}

.signup-link {
    text-align: center;
    margin-top: 25px;
    color: #718096;
    font-size: 0.95rem;
}

.signup-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: #764ba2;
}

/* 2FA Section */
.twofa-section {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.twofa-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.twofa-header {
    text-align: center;
    margin-bottom: 30px;
}

.twofa-header .icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.twofa-header .icon-wrapper i {
    font-size: 2rem;
    color: white;
}

.twofa-header h3 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.twofa-header p {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.6;
}

.twofa-header .email-display {
    color: #667eea;
    font-weight: 600;
    margin-top: 5px;
}

.code-input-wrapper {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 30px 0;
}

.code-input {
    width: 55px;
    height: 65px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f7fafc;
    color: #2d3748;
    transition: all 0.3s ease;
}

.code-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.resend-code {
    text-align: center;
    margin-top: 20px;
    color: #718096;
    font-size: 0.9rem;
}

.resend-code button {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.resend-code button:hover {
    color: #764ba2;
}

.resend-code button:disabled {
    color: #a0aec0;
    cursor: not-allowed;
    text-decoration: none;
}

.countdown {
    color: #667eea;
    font-weight: 600;
}

.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.back-to-login button {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.back-to-login button:hover {
    color: #764ba2;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-wrapper {
        grid-template-columns: 1fr;
    }

    .login-info {
        padding: 50px 40px;
        order: 1;
    }

    .login-form-section {
        padding: 50px 40px;
        order: 2;
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: 20px 15px;
    }

    .login-info {
        padding: 40px 30px;
    }

    .login-form-section {
        padding: 40px 30px;
    }

    .info-content h2 {
        font-size: 2rem;
    }

    .form-header h3 {
        font-size: 1.7rem;
    }

    .social-login {
        grid-template-columns: 1fr;
    }

    .code-input {
        width: 50px;
        height: 60px;
        font-size: 1.6rem;
    }

    .code-input-wrapper {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        border-radius: 20px;
    }

    .login-info {
        padding: 30px 20px;
    }

    .login-form-section {
        padding: 30px 20px;
    }

    .info-content h2 {
        font-size: 1.7rem;
    }

    .code-input {
        width: 45px;
        height: 55px;
        font-size: 1.4rem;
    }

    .code-input-wrapper {
        gap: 6px;
    }
}
