* {
    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;
    padding: 20px;
}

.signup-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    max-width: 500px;
    width: 100%;
}

.signup-container h1 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-size: 28px;
}

.signup-container p {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    text-transform: capitalize;
}

.form-group label i {
    margin-right: 6px;
    color: #667eea;
    width: 16px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.form-group input:hover,
.form-group select:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background-color: #f8f9ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(102, 126, 234, 0.2);
}

.form-group input:active,
.form-group select:active {
    border-color: #667eea;
}

.form-group input::placeholder {
    color: #999;
    font-weight: 400;
}

.form-group input:disabled,
.form-group select:disabled {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.role-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.role-option {
    flex: 1;
}

.role-option input[type="radio"] {
    display: none;
}

.role-option label {
    display: block;
    padding: 12px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 0;
    background-color: #f9f9f9;
}

.role-option input[type="radio"]:checked + label {
    border-color: #667eea;
    background-color: #667eea;
    color: white;
    font-weight: 600;
}

.password-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-group input {
    flex: 1;
}

.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    transition: all 0.3s ease;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
}

.toggle-password:hover {
    color: #667eea;
    background-color: rgba(102, 126, 234, 0.08);
}

.toggle-password:active {
    background-color: rgba(102, 126, 234, 0.15);
}

.password-strength {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: none;
    animation: slideDown 0.3s ease;
    border-left: 4px solid transparent;
}

.password-strength.weak {
    background-color: #ffebee;
    color: #c62828;
    border-left-color: #c62828;
}

.password-strength.medium {
    background-color: #fff3e0;
    color: #e65100;
    border-left-color: #e65100;
}

.password-strength.strong {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left-color: #2e7d32;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terms-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.terms-checkbox label {
    margin-bottom: 0;
    font-weight: 400;
    font-size: 13px;
    color: #666;
}

.terms-checkbox a {
    color: #667eea;
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

.signup-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.signup-btn:active {
    transform: translateY(0);
}

.signup-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

.error-message {
    color: #c62828;
    font-size: 12px;
    margin-top: 6px;
    display: none;
    animation: shake 0.4s ease;
    padding: 6px 10px;
    background-color: rgba(198, 40, 40, 0.08);
    border-radius: 4px;
    border-left: 3px solid #c62828;
    font-weight: 500;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

.signup-btn.loading .spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
