/* General Reset and Base 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;
    justify-content: center;
    align-items: center;
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    50% { background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%); }
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 90%;
    max-width: 450px;
    position: relative;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Dr. Gadget Face */
.dr-gadget-face {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
    animation: bobbing 2s ease-in-out infinite;
}

@keyframes bobbing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hat {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hat-top {
    width: 60px;
    height: 40px;
    background: #333;
    border-radius: 50% 50% 0 0;
    margin: 0 auto;
    position: relative;
}

.hat-top::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFD700;
}

.hat-brim {
    width: 100px;
    height: 15px;
    background: #222;
    border-radius: 50%;
    margin-top: -5px;
}

.face {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: #FDBCB4;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.eye {
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 25px;
    border: 2px solid #333;
}

.left-eye {
    left: 15px;
}

.right-eye {
    right: 15px;
}

.pupil {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: lookAround 3s ease-in-out infinite;
}

@keyframes lookAround {
    0%, 100% { transform: translate(-50%, -50%); }
    25% { transform: translate(-30%, -50%); }
    50% { transform: translate(-50%, -30%); }
    75% { transform: translate(-70%, -50%); }
}

.nose {
    position: absolute;
    width: 15px;
    height: 12px;
    background: #E8A87C;
    border-radius: 50%;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.mustache {
    position: absolute;
    top: 48px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 15px;
}

.mustache-left, .mustache-right {
    position: absolute;
    width: 30px;
    height: 15px;
    background: #666;
    border-radius: 0 0 50% 50%;
}

.mustache-left {
    left: 0;
    transform: rotate(-10deg);
}

.mustache-right {
    right: 0;
    transform: rotate(10deg);
}

.mouth {
    position: absolute;
    width: 25px;
    height: 10px;
    border: 2px solid #333;
    border-top: none;
    border-radius: 0 0 50% 50%;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.gadget-arm {
    position: absolute;
    right: -40px;
    top: 50px;
    animation: extend 4s ease-in-out infinite;
}

@keyframes extend {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
}

.spring {
    width: 30px;
    height: 3px;
    background: repeating-linear-gradient(90deg, #888 0px, #888 3px, transparent 3px, transparent 6px);
    position: relative;
}

.hand {
    position: absolute;
    right: -25px;
    top: -10px;
    font-size: 24px;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Login Form */
.login-form {
    text-align: center;
}

.login-form h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

/* Security Features */
.security-features {
    margin: 20px 0;
    text-align: left;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked ~ .checkmark {
    background: #667eea;
}

.checkbox-container input:checked ~ .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn::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;
}

.login-btn:hover::before {
    left: 100%;
}

.btn-gadget {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 15px;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 5px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Security Badge */
.security-badge {
    margin-top: 30px;
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        width: 95%;
        padding: 30px 20px;
    }
    
    .dr-gadget-face {
        width: 120px;
        height: 120px;
    }
    
    .face {
        width: 70px;
        height: 70px;
    }
    
    .login-form h2 {
        font-size: 20px;
    }
}
