* {
    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;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.form-container, .results-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.form-container h2, .results-container h3 {
    color: #4a5568;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

input, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input.valid {
    border-color: #48bb78;
    background-color: #f0fff4;
}

input.invalid {
    border-color: #f56565;
    background-color: #fff5f5;
}

.error-message {
    color: #f56565;
    font-size: 14px;
    margin-top: 5px;
    display: block;
    min-height: 20px;
}

.password-requirements {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.password-requirements p {
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a5568;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
}

.password-requirements li {
    padding: 5px 0;
    color: #718096;
    position: relative;
    padding-left: 25px;
}

.password-requirements li::before {
    content: '❌';
    position: absolute;
    left: 0;
    color: #f56565;
}

.password-requirements li.valid::before {
    content: '✅';
    color: #48bb78;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.results-box {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 100px;
}

.results-box h4 {
    color: #2d3748;
    margin-bottom: 10px;
}

.validation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.validation-item:last-child {
    border-bottom: none;
}

.validation-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.validation-status.valid {
    background: #c6f6d5;
    color: #22543d;
}

.validation-status.invalid {
    background: #fed7d7;
    color: #742a2a;
}

.sanitization-demo {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    font-family: monospace;
    font-size: 14px;
}

footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .form-container, .results-container {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Animation for validation feedback */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Success animation */
@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success {
    animation: success 0.3s ease-in-out;
} 