/* Base styles */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    background-color: #ffe5f0;
    font-family: system-ui, -apple-system, sans-serif;
    overflow: hidden;
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }
}

.container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: auto;
    padding: 1.5vw;
    gap: 2vw;
}

/* Welcome section with enhanced gradient */
.welcome-section {
    flex: 0.8;
    background: linear-gradient(135deg, #d81b60 0%, #ab47bc 50%, #9c27b0 100%);
    border-radius: 16px;
    padding: min(4vw, 40px);
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(216, 27, 96, 0.2);
    position: relative;
    overflow: hidden;
}

/* Add subtle gradient overlay */
.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.logo {
    width: min(150px, 15vw);
    margin-bottom: min(30px, 3vw);
    position: relative;
    transition: transform 0.2s ease-in-out;
}

.logo:hover {
    transform: scale(1.08);
}

.welcome-section h1 {
    margin: min(20px, 2vw) 0 min(10px, 1vw);
    font-size: clamp(1.5em, 2vw, 2em);
    width: 100%;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    animation: slideDown 1s ease-out;
}
.welcome-section p {
    margin: 0;
    opacity: 0.9;
    font-size: clamp(0.9em, 1.2vw, 1.1em);
    width: 100%;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translate(-50%, -15px);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translate(-50%, 15px);
    }
    to { 
        opacity: 0.9;
        transform: translate(-50%, 0);
    }
}

/* Form section */
.form-section {
    flex: 1.2;
    background: white;
    border-radius: 16px;
    padding: min(4vw, 40px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    max-height: 90vh;
}

.form-section h2 {
    margin: 0 0 min(10px, 1vw);
    color: #1f2937;
    font-size: clamp(1.3em, 1.8vw, 1.8em);
}


@keyframes fadeOut {
    from { 
        opacity: 1; 
        transform: translate(-50%, 0);
    }
    to { 
        opacity: 0; 
        transform: translate(-50%, -20px);
    }
}




.form-section p {
    margin: 0 0 min(30px, 3vw);
    color: #6b7280;
    font-size: clamp(0.9em, 1vw, 1em);
}

/* Form groups with responsive spacing */
.form-group {
    margin-bottom: min(20px, 2vw);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1vw;
}

.form-group label {
    display: block;
    margin-bottom: min(8px, 0.8vw);
    color: #374151;
    font-weight: 500;
    font-size: clamp(0.85em, 0.9vw, 1em);
}

.form-group input {
    width: 100%;
    padding: min(10px, 1vw);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: clamp(0.85em, 0.9vw, 1em);
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.form-group select {
    width: 100%;
    padding: min(10px, 1vw);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: clamp(0.85em, 0.9vw, 1em);
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}


.form-group input:focus {
    border-color: #ab47bc;
    box-shadow: 0 0 0 2px rgba(171, 71, 188, 0.1);
    transform: translateY(-1px);
}
.form-group select:focus {
    border-color: #ab47bc;
    box-shadow: 0 0 0 2px rgba(171, 71, 188, 0.1);
    transform: translateY(-1px);
}

/* Enhanced button styles */
button {
    width: 100%;
    padding: min(12px, 1.2vw);
    background: linear-gradient(135deg, #d81b60 0%, #ab47bc 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: clamp(0.9em, 1vw, 1em);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover {
    background: linear-gradient(135deg, #c2185b 0%, #9c27b0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(194, 24, 91, 0.2);
}

button:active {
    transform: translateY(0);
}

.input-wrapper {
    position: relative;
  }

  .input-wrapper input {
    padding-right: 35px; /* Make space for the icon */
  }

  .input-wrapper i {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-60%);
    cursor: pointer;
    color: #888;
  }

  button[type="submit"]:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.error {
    color: #dc2626;
    margin-bottom: min(20px, 2vw);
    font-size: clamp(0.85em, 0.9vw, 1em);
}

.login-link {
    text-align: center;
    margin-top: min(20px, 2vw);
    color: #6b7280;
    font-size: clamp(0.85em, 0.9vw, 1em);
}

.login-link a {
    color: #ab47bc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.login-link a:hover {
    color: #c2185b;
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }
    
    .container {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .welcome-section {
        padding: 2rem;
        min-height: 150px; /* Reduced height on mobile */
    }

    .form-section {
        padding: 1.5rem;
        max-height: none;
    }

    .form-group {
        grid-template-columns: 1fr;
    }
    
    /* Increase touchable area for inputs on mobile */
    .form-group input,
    .form-group select {
        padding: 14px; /* Fixed larger padding for mobile */
        min-height: 48px; /* Minimum touch target size */
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    button {
        padding: 14px; /* Larger button for easier touch */
        min-height: 48px;
        font-size: 16px;
    }
    
    /* Better spacing between form elements */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        margin-bottom: 8px;
        font-size: 14px;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    .container {
        padding: 0.8rem;
    }
    
    .welcome-section {
        padding: 1.5rem;
        min-height: 120px;
    }
    
    .form-section {
        padding: 1.2rem;
    }
    
    /* Even larger touch targets for very small screens */
    .form-group input,
    .form-group select,
    button {
        min-height: 50px;
    }
}

/* Custom scrollbar for form section */
.form-section::-webkit-scrollbar {
    width: 8px;
}

.form-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.form-section::-webkit-scrollbar-thumb {
    background: #c2185b;
    border-radius: 4px;
}

.form-section::-webkit-scrollbar-thumb:hover {
    background: #ab47bc;
}


.logo {
    animation: float 6s ease-in-out infinite;
}

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

/* Welcome section fade in */
.welcome-section {
    animation: fadeIn 0.8s ease-out;
}

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


/* Animated gradient overlay */
.welcome-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
    animation: shimmer 4s ease-in-out;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(0deg); }
    50% { transform: translateX(100%) rotate(5deg); }
    100% { transform: translateX(-100%) rotate(0deg); }
}

/* Enhance hover effects */
.welcome-section:hover::after {
    animation-duration: 4s;
    animation: shimmer 5s ease-in-out;
}

.welcome-section {
    transition: transform 0.3s ease;
}

.welcome-section:hover {
    transform: scale(1.01);
}

/* Error input styling */
.input-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1) !important;
}

.error {
    color: #dc2626;
    font-size: 0.8em;
    margin-top: 5px;
    animation: fadeIn 0.3s ease-out;
}

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