* {
    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%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -150px;
    right: -150px;
    animation: float 6s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(20px); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

main {
    background-color: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: slideIn 0.5s ease-out;
}

.icon-header {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.icon-header i {
    font-size: 36px;
    color: white;
}

h1 {
    margin-bottom: 10px;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.6;
}

.error, .message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    animation: slideIn 0.5s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
    animation: shake 0.5s ease-out;
}

.message {
    background: linear-gradient(135deg, #1dd1a1 0%, #10ac84 100%);
    color: white;
    border: none;
}

.error i, .message i {
    font-size: 18px;
}

form {
    margin-top: 30px;
}

form > div {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.required {
    color: #ff6b6b;
    font-weight: bold;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i.input-icon {
    position: absolute;
    left: 15px;
    color: #999;
    transition: color 0.3s;
    z-index: 1;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 14px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

input:focus ~ .input-icon {
    color: #667eea;
}

.toggle-password {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    z-index: 2;
}

.toggle-password:hover {
    color: #667eea;
}

.validation-message {
    margin-top: 8px;
    font-size: 12px;
    display: none;
}

.validation-message.valid {
    color: #1dd1a1;
    display: block;
}

.validation-message.invalid {
    color: #ff6b6b;
    display: block;
}

.validation-message i {
    margin-right: 5px;
}

.password-strength {
    margin-top: 8px;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    display: none;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
}

.password-strength.weak .password-strength-bar {
    width: 33%;
    background-color: #ff6b6b;
}

.password-strength.medium .password-strength-bar {
    width: 66%;
    background-color: #feca57;
}

.password-strength.strong .password-strength-bar {
    width: 100%;
    background-color: #1dd1a1;
}

.password-requirements {
    text-align: left;
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: none;
}

.password-requirements.show {
    display: block;
}

.password-requirements strong {
    display: block;
    margin-bottom: 5px;
}

.password-requirements ul {
    list-style: none;
    margin-top: 5px;
}

.password-requirements li {
    padding: 3px 0;
}

.password-requirements li i {
    margin-right: 5px;
    font-size: 10px;
}

.password-requirements li.valid {
    color: #1dd1a1;
}

.password-requirements li.invalid {
    color: #999;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 25px 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
}

.checkbox-group label a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.checkbox-group label a:hover {
    text-decoration: underline;
}

button[type="submit"] {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.links {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.links p {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.links a:hover {
    color: #764ba2;
}

@media (max-width: 480px) {
    main {
        padding: 30px 20px;
    }

    h1 {
        font-size: 24px;
    }

    .icon-header {
        width: 60px;
        height: 60px;
    }

    .icon-header i {
        font-size: 28px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 12px 40px;
        font-size: 14px;
    }
}
