* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

:root {
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --secondary-color: #3f37c9;
    --success-color: #4caf50;
    --error-color: #f44336;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-color);
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header {
    text-align: center;
    margin-bottom: 10px;
}

header h1 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

header h1 i {
    margin-right: 10px;
}

.form-container {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group label i {
    color: var(--primary-color);
    margin-right: 5px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    outline: none;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.notification-area {
    margin-bottom: 20px;
    min-height: 40px;
}

.notice, .notice2 {
    padding: 8px 0;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn i {
    margin-right: 5px;
}

.result {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 25px;
}

.result-container {
    text-align: center;
    width: 100%;
}

.code {
    font-size: 20px;
    font-weight: 700;
    color: var(--success-color);
    margin: 15px 0;
    padding: 10px;
    word-break: break-all;
}

.numkey {
    font-size: 16px;
    color: var(--primary-color);
    margin-top: 5px;
}

.loading {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(67, 97, 238, 0.2);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .form-container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .code {
        font-size: 18px;
    }
}

/* Thêm vào file CSS của bạn để có hiệu ứng đẹp hơn */

/* Hiệu ứng khi trang tải xong */
.form-container {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.form-container.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Hiệu ứng cho ô input khi focus */
.input-group.focused label {
    color: var(--primary-color);
    font-weight: 500;
}

/* Hiệu ứng highlight cho mã xác thực */
.highlight-animation {
    animation: highlight 1.5s ease;
}

@keyframes highlight {
    0% {
        background-color: rgba(76, 175, 80, 0.2);
    }
    50% {
        background-color: rgba(76, 175, 80, 0.3);
    }
    100% {
        background-color: transparent;
    }
}

/* Hiệu ứng cho nút khi gửi */
.btn.sending {
    background-image: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    opacity: 0.8;
}

/* Hiệu ứng nổi cho card khi hover */
.form-container:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* Hiệu ứng cho các thông báo */
.notice, .notice2 {
    opacity: 0;
    transform: translateY(5px);
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hiệu ứng cho code */
.code {
    background-color: rgba(76, 175, 80, 0.05);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--success-color);
    transition: all 0.3s ease;
    word-wrap: break-word;
}

.code:empty {
    display: none;
}

.numkey:empty {
    display: none;
}