:root {
    --primary: #FF385C;
    --primary-gradient: linear-gradient(135deg, #FF385C 0%, #FF7E5F 100%);
    --primary-hover: #E31C5F;
    --primary-light: rgba(255, 56, 92, 0.08);
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-dark: #0F172A;
    --text-gray: #64748B;
    --border-color: #E2E8F0;
    --success: #10B981;
    --error: #EF4444;
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background: var(--bg-color);
    color: var(--text-dark);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.onboarding-container {
    width: 100%;
    max-width: 500px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    margin: auto 0;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
}

.step-dot {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    margin: 0 4px;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.step-dot.active {
    background: var(--primary-gradient);
}

.onboarding-step {
    display: none;
    animation: slideIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.onboarding-step.active {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

p.subtitle {
    color: var(--text-gray);
    font-size: 15px;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    font-size: 15px;
    transition: all 0.2s ease;
    background: #fff;
    font-family: inherit;
    resize: vertical;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

input:disabled, textarea:disabled {
    background: #F1F5F9;
    cursor: not-allowed;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn {
    flex: 1;
    padding: 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 16px rgba(255, 56, 92, 0.2);
}

.error-message {
    color: var(--error);
    font-size: 11px;
    font-weight: 600;
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 4px;
}

.error-message.show {
    display: flex;
}

/* Profile Picture Upload Styles */
.profile-upload-section {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-color);
    visibility: visible !important;
    opacity: 1 !important;
}

.profile-preview-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.profile-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-preview-container i {
    font-size: 32px;
    color: var(--text-gray);
}

.btn-upload {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-upload:hover {
    background: var(--bg-color);
    border-color: var(--text-gray);
}

.error-message.show {
    display: flex;
}

.error-input {
    border-color: var(--error) !important;
}

.back-to-home {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 100;
    font-size: 14px;
}

.back-to-home:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateX(-2px);
}

.error-input:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 56, 92, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--bg-color);
    border-color: var(--text-dark);
}

/* Step 2 Specifics */
.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.radio-item {
    position: relative;
}

.radio-item input {
    position: absolute;
    opacity: 0;
}

.radio-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.radio-item input:checked + .radio-label {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.radio-label i {
    font-size: 24px;
    margin-bottom: 8px;
}

.guidance-box {
    background: #FFFBEB;
    border: 1px solid #FEF3C7;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    display: none;
}

.guidance-box.show {
    display: block;
}

.guidance-box p {
    font-size: 13px;
    color: #92400E;
    font-weight: 500;
}

.tip-text {
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 12px;
    font-style: italic;
    line-height: 1.4;
}

/* Step 3 Specifics */
.portfolio-list {
    margin-bottom: 24px;
}

.portfolio-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.remove-link {
    background: #FEE2E2;
    color: var(--error);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-link:hover {
    background: var(--error);
    color: white;
}

.add-more-btn {
    background: var(--primary-light);
    color: var(--primary);
    border: 1.5px dashed var(--primary);
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 24px;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1000px;
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
}

.creator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.creator-info h1 {
    font-size: 32px;
    font-weight: 800;
}

.creator-info p {
    color: var(--primary);
    font-weight: 600;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.portfolio-card {
    background: var(--bg-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.portfolio-card .aspect-ratio-box {
    width: 100%;
    padding-top: 100%;
    position: relative;
    background: #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-card .aspect-ratio-box i {
    font-size: 48px;
    color: var(--text-gray);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.portfolio-card .link-text {
    padding: 16px;
    font-size: 13px;
    color: var(--text-gray);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    flex-direction: column;
    gap: 16px;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    body {
        padding: 24px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
    }

    .onboarding-container {
        width: calc(100% - 32px) !important;
        max-width: 450px !important;
        margin: 12px auto !important;
        padding: 32px 20px !important;
        box-sizing: border-box !important;
        transform: none !important;
        transition: none !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        overflow: hidden !important;
    }

    /* Change step slide animation to vertical/opacity only on mobile to avoid horizontal shift */
    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .onboarding-step {
        animation: slideIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
    }

    .radio-group {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .stats-cols {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .ext-style-17 {
        grid-template-columns: 1fr !important;
    }
}
