* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a, #2a2a2a);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
}

/* Animated background particles */
.bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    width: 4px;
    height: 4px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 6px;
    height: 6px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 3px;
    height: 3px;
    top: 40%;
    left: 60%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 5px;
    height: 5px;
    top: 80%;
    left: 30%;
    animation-delay: 1s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.login-card {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideUp 0.8s ease-out;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ffffff, #cccccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.logo p {
    color: #888;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 15px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #555;
    background: rgba(40, 40, 40, 0.9);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder {
    color: #666;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #333, #555);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background: linear-gradient(135deg, #444, #666);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.forgot-password {
    text-align: center;
    display: none;
}

.forgot-password a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #ccc;
    text-decoration: underline;
}

.footer {
    background: rgba(10, 10, 10, 0.9);
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
    position: relative;
    z-index: 2;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #fff;
}

.modal h2 {
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
}

.modal p {
    color: #ccc;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

.reset-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #333, #555);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: linear-gradient(135deg, #444, #666);
}

.success-message {
    background: rgba(0, 150, 0, 0.2);
    border: 1px solid rgba(0, 200, 0, 0.3);
    color: #4ade80;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    display: none;
}

.error-message {
    background: rgba(150, 0, 0, 0.2);
    border: 1px solid rgba(200, 0, 0, 0.3);
    color: #f87171;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    display: none;
}

/* Floating Back Button */
.back-button {
    position: fixed;
    top: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    color: #ccc;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeInSlide 0.8s ease-out 0.5s both;
}

.back-button:hover {
    background: rgba(50, 50, 50, 0.9);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    color: #fff;
}

.back-button:active {
    transform: translateY(0) scale(0.98);
}

.back-button svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.back-button:hover svg {
    transform: translateX(-2px);
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-20px) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .back-button {
        top: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }

    .back-button svg {
        width: 18px;
        height: 18px;
    }
}