:root {
    --primary-color: #6a0d8a;
    /* Deep Purple */
    --secondary-color: #d12e88;
    /* Pink/Magenta */
    --background-color: #f4f4f4;
    --text-color: #333;
    --text-light: #fff;
    --border-radius: 12px;
    --transition-speed: 0.4s;
    --font-family: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #1e0536 0%, #4a0a5e 100%);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px 0;
    /* Add padding to prevent cut-off */
    flex-direction: column;
    /* Stack logo and container vertically */
}

/* Background Overlay for texture or particles if needed */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: -1;
}

.logo-container {
    position: relative;
    /* Changed from absolute to flow naturally */
    text-align: center;
    margin-bottom: 20px;
    z-index: 10;
}

.logo {
    max-width: 120px;
    /* Slightly smaller for better proportion */
    height: auto;
}

.container {
    width: 90%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    /* Ensure consistent height */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-speed) ease-in-out;
}

.step.hidden {
    display: none;
    opacity: 0;
}

.step.active {
    display: flex;
    opacity: 1;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

input,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

input:focus,
select:focus {
    border-color: var(--secondary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
    text-align: left;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
}

.input-wrapper label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: 600;
}

.input-wrapper small {
    font-size: 0.75rem;
    color: #888;
}

/* Make inputs full width on small screens in grid */
@media (max-width: 500px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

button {
    cursor: pointer;
    font-family: var(--font-family);
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:active {
    transform: scale(0.98);
}

.btn-next {
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.btn-next:hover {
    background: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(209, 46, 136, 0.3);
}

.btn-back {
    background: transparent;
    border: 2px solid #ccc;
    color: #666;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    margin-right: 10px;
}

.btn-back:hover {
    border-color: #888;
    color: #333;
    background: #f0f0f0;
}

.buttons-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

.btn-main {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-main:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Role Selection Buttons */
.role-selection {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-role {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 20px;
    border-radius: 12px;
    width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
}

.btn-role i {
    font-size: 2rem;
}

.btn-role:hover {
    background: var(--primary-color);
    color: white;
}

/* Checkbox Cards */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
}

.checkbox-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-card:hover {
    border-color: var(--secondary-color);
    background: #fffafa;
}

.checkbox-card input {
    width: auto;
    margin-right: 10px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    body {
        flex-direction: column;
        padding: 20px;
        justify-content: center;
        /* Keep centered but stack */
    }

    .logo-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin-bottom: 10px;
        /* Reduced */
    }

    .logo {
        max-width: 100px;
        /* Smaller logo */
    }

    .container {
        width: 100%;
        padding: 20px 15px;
        /* Reduced padding */
        min-height: auto;
        /* Allow auto height */
    }

    .step {
        justify-content: flex-start;
        /* Pack content to top slightly */
    }

    .input-group {
        flex-direction: column;
        max-width: 100%;
    }

    .btn-next,
    .btn-back {
        width: 100%;
        margin-top: 10px;
        margin-right: 0;
    }

    .buttons-container {
        flex-direction: column-reverse;
        /* Put Back button below Next button on mobile */
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* File Upload */
.upload-area {
    border: 2px dashed #ccc;
    padding: 30px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: #f9f9f9;
}

.upload-area:hover {
    border-color: var(--secondary-color);
    background: #fff0f8;
}

.upload-area i {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Share Section */
.share-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-icon {
    background: #eee;
    color: #333;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.btn-icon:hover {
    background: #ddd;
}

/* Success Animation */
.success-container {
    text-align: center;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 3rem;
    animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleUp {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* Animations */
.animate-text {
    opacity: 0;
}

.pop-in {
    animation: popIn 0.8s forwards;
}

.slide-up {
    animation: slideUp 0.8s forwards;
}

.fade-in {
    animation: fadeIn 0.8s forwards;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.delay-1 {
    animation-delay: 0.3s;
}

.delay-2 {
    animation-delay: 0.6s;
}

.delay-3 {
    animation-delay: 0.9s;
}

.delay-4 {
    animation-delay: 1.2s;
}

.error-msg {
    color: #d9534f;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 0;
    /* Remove fixed height to save space */
    padding: 0 5px;
    /* Add some padding if needed when text exists */
}

.mt-4 {
    margin-top: 1.5rem;
}