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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    min-height: 80vh;
}

.signup-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 450px;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 20px 0;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.signup-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
}

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

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h4 {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 400;
    color: #5a6c7d;
    margin-bottom: 25px;
    line-height: 1.5;
}

h4 span {
    text-decoration: none;
    cursor: pointer;
}

h4 span a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 2px 4px;
    border-radius: 4px;
}

h4 span a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

h4 span a:hover {
    color: #5a67d8;
    background: rgba(102, 126, 234, 0.1);
}

h4 span a:hover::after {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: #a0a0a0;
    font-weight: 300;
}

/* Status message styling */
.status {
    margin-top: 5px;
    font-size: 0.85rem;
    min-height: 20px;
}

/* Button Styles */
.btn-success {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-bottom: 15px;
}

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

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 4px 10px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

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

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

/* Forgot password link */
.form-group a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.form-group a:hover {
    color: #5a67d8;
    transform: translateX(5px);
}

/* Login message styling */
.loginMsg {
    display: block;
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #6c757d;
}

/* Error message styling - for PHP error messages */
.loginMsg {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* Success message styling */
.loginMsg[style*="color: green"],
.loginMsg:contains("Successfully") {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

/* HR styling */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e9ecef, transparent);
    margin: 20px 0;
}

/* Form responsiveness */
form {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        min-height: 70vh;
    }
    
    .signup-form {
        padding: 30px 25px;
        margin: 15px 0;
        max-width: 100%;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .form-control {
        padding: 12px 14px;
    }
    
    .btn-success {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .signup-form {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h4 {
        font-size: 1rem;
    }
}

/* Form group adjustments for better spacing */
.form-group:last-of-type {
    margin-bottom: 0;
}

/* Focus states for accessibility */
.form-control:focus,
.btn-success:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.3),
        0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Smooth animations */
.signup-form,
.form-control,
.btn-success,
h4 span a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Password input specific styling */
.inputpass {
    letter-spacing: 0.5px;
}

/* Container for form elements alignment */
.form-group > p {
    margin: 0;
}

/* Status message container */
#status {
    font-size: 0.85rem;
    color: #6c757d;
    min-height: 20px;
    margin-top: 5px;
}

/* Floating animation for the form */
@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.signup-form {
    animation: floatIn 0.6s ease-out;
}

/* Button loading state */
.btn-success:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-success:disabled:hover {
    transform: none;
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 2px 5px rgba(0, 0, 0, 0.1);
}