﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #696660, #4b3d29, #1f1402);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: auto;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-out {
    animation: fadeOut 0.8s ease-in-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.particles-container {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: 0;
    left: 0;
}

.particle {
    position: absolute;
    background-color: rgba(255, 204, 1, 0.15);
    border-radius: 50%;
}

.register-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.register-container {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 32px;
    width: 440px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
    margin: 20px;
    position: relative;
    transition: transform 0.5s ease, opacity 0.5s ease;
    border: 1px solid rgba(255, 204, 1, 0.12);
}

.logo {
    text-align: center;
    margin-bottom: 28px;
    color: #2c2c2c;
}

.logo i {
    font-size: 40px;
    margin-bottom: 10px;
    color: #FFCC01;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 5px;
    color: #1D1D1D;
}

.logo p {
    font-size: 14px;
    color: #888888;
}

.input-group {
    position: relative;
    margin-bottom: 32px;
}

.input-group label {
    display: block;
    color: #3d3d3d;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

.input-group .left-icon {
    position: absolute;
    left: 14px;
    top: 38px;
    color: #aaaaaa;
    font-size: 16px;
}

.input-group input {
    width: 100%;
    padding: 12px 40px 12px 40px;
    border: 1.5px solid #e8e3da;
    background-color: #fcfaf7;
    border-radius: 10px;
    color: #2c2c2c;
    font-size: 14px;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #FFCC01;
    box-shadow: 0 0 0 3px rgba(255, 204, 1, 0.12);
    background-color: #ffffff;
}

.input-group input:hover {
    border-color: #d4cdc0;
}

.input-group .validation-icon {
    position: absolute;
    right: 14px;
    top: 38px;
    font-size: 16px;
}

.input-group .fa-check {
    color: #66bb6a;
    display: none;
}

.input-group .fa-times {
    color: #ef5350;
    display: none;
}

.input-group .error-tooltip {
    position: absolute;
    background-color: #ef5350;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    top: calc(100% + 4px);
    right: 0;
    display: none;
    z-index: 100;
    width: auto;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(239, 83, 80, 0.2);
}

.input-group .error-tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 15px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #ef5350;
}

.password-strength {
    margin-top: 6px;
    height: 4px;
    border-radius: 4px;
    background-color: #eeebe6;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 4px;
}

.password-strength-text {
    font-size: 12px;
    color: #999999;
    margin-top: 5px;
    text-align: left;
}

.register-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #FFCC01, #F5C200);
    border: none;
    border-radius: 10px;
    color: #1D1D1D;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(255, 204, 1, 0.2);
}

.register-btn:hover {
    background: linear-gradient(135deg, #F5C200, #E6B800);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 204, 1, 0.25);
}

.register-btn:active {
    transform: translateY(0);
}

.login-link {
    text-align: center;
    margin-top: 20px;
    color: #999999;
    font-size: 14px;
}

.login-link a {
    color: #FFCC01;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
    color: #E6B800;
}

.form-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eeebe6;
    font-size: 12px;
    color: #bbbbbb;
    text-align: center;
}

.explosion-particle {
    position: absolute;
    background: linear-gradient(135deg, #FFCC01, #F5C200);
    border-radius: 50%;
    width: 8px;
    height: 8px;
    pointer-events: none;
    opacity: 0;
}

@keyframes explode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.exploding {
    animation: explodeForm 0.8s forwards;
    overflow: hidden;
}

@keyframes explodeForm {
    0% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0);
    }
    70% {
        transform: scale(1.1);
        opacity: 0.7;
        filter: blur(2px);
    }
    100% {
        transform: scale(0);
        opacity: 0;
        filter: blur(8px);
    }
}

body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: #f5f0e8;
    border-radius: 10px;
}

body::-webkit-scrollbar-thumb {
    background: #FFCC01;
    border-radius: 10px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #E6B800;
}

@media (max-height: 700px) {
    body {
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .register-container {
        padding: 20px;
        width: 100%;
        margin: 10px;
    }

    .input-group input {
        padding: 12px 35px 12px 35px;
    }

    .input-group .left-icon {
        left: 12px;
    }

    .input-group .validation-icon {
        right: 12px;
    }

    .input-group .error-tooltip {
        white-space: normal;
        width: 100%;
        text-align: center;
    }
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    margin: 10% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: modalopen 0.4s;
    border: 1px solid rgba(255, 204, 1, 0.1);
}

@keyframes modalopen {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #FFCC01, #F5C200);
    padding: 20px 24px;
    color: #1D1D1D;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    font-size: 1.2rem;
}

.close {
    color: #1D1D1D;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.6;
}

.close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-body {
    padding: 28px 24px;
}

.modal-body p {
    margin-bottom: 20px;
    color: #3d3d3d;
    line-height: 1.6;
    text-align: center;
    font-size: 14px;
}

.countdown {
    display: inline-block;
    background: rgba(255, 204, 1, 0.15);
    color: #D4A800;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.verification-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 8px;
}

.verification-code {
    flex: 1;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    border: 1.5px solid #e8e3da;
    border-radius: 10px;
    background-color: #fcfaf7;
    color: #2c2c2c;
    transition: all 0.3s;
    width: 60px;
    text-transform: uppercase;
}

.verification-code:focus {
    outline: none;
    border-color: #FFCC01;
    box-shadow: 0 0 0 3px rgba(255, 204, 1, 0.12);
    transform: scale(1.04);
    background-color: #ffffff;
}

.verification-code:hover {
    border-color: #d4cdc0;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.resend-btn,
.verify-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    font-size: 14px;
}

.resend-btn {
    background-color: #f5f0e8;
    color: #777777;
}

.resend-btn:not(.disabled):hover {
    background-color: #eeebe6;
    transform: translateY(-2px);
}

.resend-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.verify-btn {
    background: linear-gradient(135deg, #FFCC01, #F5C200);
    color: #1D1D1D;
    box-shadow: 0 4px 12px rgba(255, 204, 1, 0.2);
}

.verify-btn:hover {
    background: linear-gradient(135deg, #F5C200, #E6B800);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 204, 1, 0.25);
}

.verify-btn:active {
    transform: translateY(0);
}

@media screen and (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 15% auto;
    }

    .verification-code {
        height: 44px;
        font-size: 18px;
        width: 50px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .resend-btn,
    .verify-btn {
        width: 100%;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-body {
        padding: 20px 16px;
    }
}