/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #d8e5f8;
    position: relative;
    overflow: hidden;
}

/* Fluid Gradient Mesh Background (Replicating the Photo Concept) */
.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at top left, #c4e0ff, transparent 50%),
                radial-gradient(circle at top right, #e2d1fa, transparent 50%),
                radial-gradient(circle at bottom left, #fffad1, transparent 50%),
                radial-gradient(circle at bottom right, #a18cd1, transparent 50%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite alternate;
}

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

/* Animated Blobs for depth */
.mesh-blob {
    position: absolute;
    filter: blur(80px);
    z-index: 0;
    border-radius: 50%;
    opacity: 0.8;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: rgba(142, 197, 252, 0.6);
    top: -100px;
    left: -100px;
    animation: float 12s ease-in-out infinite;
}

.blob-2 {
    width: 800px;
    height: 800px;
    background: rgba(224, 195, 252, 0.6);
    bottom: -200px;
    right: -200px;
    animation: float 18s ease-in-out infinite reverse;
}

.blob-3 {
    width: 500px;
    height: 500px;
    background: rgba(184, 250, 246, 0.5);
    bottom: 20%;
    left: 10%;
    animation: float 25s ease-in-out infinite;
}

.blob-4 {
    width: 400px;
    height: 400px;
    background: rgba(185, 43, 227, 0.4);
    top: 30%;
    right: 20%;
    animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0) scale(1); }
    33% { transform: translateY(-30px) translateX(20px) scale(1.05); }
    66% { transform: translateY(20px) translateX(-20px) scale(0.95); }
    100% { transform: translateY(0) translateX(0) scale(1); }
}

/* Glassmorphism Card */
.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: 20px;
    padding: 40px 35px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
}

/* Instagram Logo */
.instagram-logo {
    font-family: 'Grand Hotel', cursive;
    font-size: 3.5rem;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-container label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    padding-left: 2px;
}

/* Input Fields matching the photo concept */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 0.95rem;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

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

input:focus {
    background: rgba(255, 255, 255, 0.5);
    border-color: #927fd1;
    box-shadow: 0 0 0 3px rgba(146, 127, 209, 0.2);
}

/* Password Wrapper and Toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 90px; /* Make room for the toggle button */
}

.toggle-password {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(0, 0, 0, 0.2);
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 0 8px 8px 0;
}

.toggle-password:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Login Button */
.submit-btn {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: #9b7de2; /* Purple tone from the photo */
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
    box-shadow: 0 4px 15px rgba(155, 125, 226, 0.4);
}

.submit-btn:hover {
    background: #8765d1;
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Divider 'OR' */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0 20px;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.divider span {
    padding: 0 15px;
}

/* Extra Links */
.extra-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.facebook-login {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #385185;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.facebook-login:hover {
    opacity: 0.8;
}

.forgot-password {
    color: #333;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #666;
    text-decoration: underline;
}

/* Sign Up Section */
.signup-container {
    margin-top: 25px;
    text-align: right;
    font-size: 0.9rem;
    color: #555;
}

.signup-container a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
}

.signup-container a:hover {
    text-decoration: underline;
}

/* Fixed Footer Security Warning */
.security-warning {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ff3b30;
    color: white;
    text-align: center;
    padding: 16px 20px;
    font-size: 0.95rem;
    z-index: 100;
    box-shadow: 0 -4px 15px rgba(255, 59, 48, 0.3);
    animation: slideUp 0.5s ease-out forwards;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-card {
        margin: 15px;
        padding: 30px 20px;
    }
}
