.profile-setup-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.profile-setup-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.profile-setup-modal-content {
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.95), rgba(15, 15, 15, 0.98));
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transform: scale(0.8) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.profile-setup-modal-overlay.visible .profile-setup-modal-content {
    transform: scale(1) translateY(0);
}

.profile-setup-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-setup-modal-header h2 {
    color: #ffffff;
    font-size: 32px;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.profile-setup-subtitle {
    color: #b8c5d1;
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.profile-setup-modal-body {
    margin-bottom: 30px;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #e8f0fe;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 16px;
    color: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-help {
    color: #9aa5b1;
    font-size: 14px;
    margin-top: 5px;
}

.input-error {
    color: #ef5350;
    font-size: 14px;
    margin-top: 5px;
    padding: 8px 12px;
    background: rgba(239, 83, 80, 0.1);
    border: 1px solid rgba(239, 83, 80, 0.3);
    border-radius: 8px;
    animation: fadeInDown 0.3s ease-out;
}

.profile-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.profile-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 180px;
    justify-content: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.profile-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.profile-button.primary {
    background: linear-gradient(135deg, #cc0000, #a00000);
    color: white;
    box-shadow: 0 4px 20px rgba(204, 0, 0, 0.3);
}
.profile-button.primary:hover {
    background: linear-gradient(135deg, #e60000, #cc0000);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(204, 0, 0, 0.4);
}
.profile-button.primary:disabled {
    background: rgba(204, 0, 0, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-icon {
    font-size: 18px;
}

.profile-setup-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    text-align: center;
}

.profile-tips {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
}

.profile-tips p {
    color: #b8c5d1;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.profile-button.loading {
    position: relative;
    color: transparent;
}

.profile-button.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: profileButtonSpin 1s linear infinite;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes profileButtonSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .profile-setup-modal-content {
        width: 95%;
        padding: 30px 20px;
        max-height: 90vh;
    }

    .profile-setup-modal-header h2 {
        font-size: 28px;
    }

    .profile-button {
        width: 100%;
        max-width: 300px;
    }

    .form-group input {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .profile-setup-modal-content {
        padding: 25px 15px;
    }

    .profile-setup-modal-header h2 {
        font-size: 24px;
    }

    .form-group input {
        font-size: 16px; 
    }
}

@media (prefers-contrast: high) {
    .profile-setup-modal-content {
        border-color: #ffffff;
        background: rgba(0, 0, 0, 0.95);
    }

    .profile-button.primary {
        background: #cc0000;
        border: 2px solid #ffffff;
    }

    .form-group input {
        border-color: #ffffff;
        background: rgba(0, 0, 0, 0.8);
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-setup-modal-overlay {
        transition: opacity 0.2s ease;
    }

    .profile-setup-modal-content {
        transition: transform 0.2s ease;
    }

    .profile-button {
        transition: background-color 0.2s ease;
    }

    .profile-button.loading::after {
        animation: none;
        border: 2px solid #ffffff;
        border-radius: 2px;
    }
}