/* =====================================================
   Soul Realms - Unified Modal CSS System
   Brand-compliant modal components with consistent styling
   Version: 1.0.0
   ===================================================== */

/* =====================================================
   CSS Variables for Modal System
   ===================================================== */
:root {
    /* Brand Colors */
    --sr-modal-gold: #ffd700;
    --sr-modal-gold-light: #ffdf33;
    --sr-modal-gold-dark: #ccac00;
    --sr-modal-purple: #450086;
    --sr-modal-purple-medium: #5f00b9;
    --sr-modal-purple-dark: #2b0053;
    
    /* Modal Background Colors */
    --sr-modal-bg-primary: linear-gradient(145deg, rgba(69, 0, 134, 0.15) 0%, rgba(26, 26, 46, 0.98) 100%);
    --sr-modal-bg-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --sr-modal-overlay-bg: rgba(0, 0, 0, 0.85);
    
    /* Typography */
    --sr-modal-font-heading: 'Cormorant Garamond', serif;
    --sr-modal-font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --sr-modal-padding: 24px;
    --sr-modal-padding-lg: 32px;
    --sr-modal-gap: 12px;
    --sr-modal-border-radius: 16px;
    
    /* Z-Index System */
    --sr-modal-z-base: 10000;
    --sr-modal-z-overlay: 10001;
    --sr-modal-z-container: 10002;
    --sr-modal-z-nested: 11000;
    --sr-modal-z-toast: 20000;
    
    /* Transitions */
    --sr-modal-transition-fast: 0.2s ease;
    --sr-modal-transition-normal: 0.3s ease;
    --sr-modal-transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =====================================================
   Base Modal Structure
   ===================================================== */
.sr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--sr-modal-z-base);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sr-modalFadeIn 0.3s ease forwards;
}

.sr-modal[aria-hidden="true"] {
    display: none;
}

/* Modal Overlay (Background) */
.sr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--sr-modal-overlay-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--sr-modal-z-overlay);
}

/* Modal Container */
.sr-modal-container {
    position: relative;
    z-index: var(--sr-modal-z-container);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--sr-modal-bg-dark);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--sr-modal-border-radius);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: sr-modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* =====================================================
   Modal Header
   ===================================================== */
.sr-modal-header {
    padding: var(--sr-modal-padding);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(145deg, rgba(69, 0, 134, 0.15) 0%, rgba(26, 26, 46, 0.1) 100%);
    flex-shrink: 0;
}

.sr-modal-title {
    font-family: var(--sr-modal-font-heading);
    font-size: 28px;
    font-weight: 600;
    color: var(--sr-modal-gold);
    margin: 0;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    line-height: 1.3;
}

.sr-modal-subtitle {
    font-family: var(--sr-modal-font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 8px 0 0 0;
}

/* Close Button */
.sr-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--sr-modal-transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.sr-modal-close:hover {
    color: var(--sr-modal-gold);
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    transform: rotate(90deg);
}

.sr-modal-close:focus {
    outline: 2px solid var(--sr-modal-gold);
    outline-offset: 2px;
}

/* =====================================================
   Modal Body
   ===================================================== */
.sr-modal-body {
    padding: var(--sr-modal-padding-lg) var(--sr-modal-padding);
    overflow-y: auto;
    flex: 1;
    font-family: var(--sr-modal-font-body);
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Content headings inside modal body (legal documents, about pages, etc.) */
.sr-modal-body h3 {
    font-family: var(--sr-modal-font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--sr-modal-gold);
    margin: 28px 0 12px 0;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.sr-modal-body h4 {
    font-family: var(--sr-modal-font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sr-modal-gold-light);
    margin: 16px 0 8px 0;
    line-height: 1.3;
}

.sr-modal-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    margin: 24px 0;
}

.sr-modal-body a {
    color: var(--sr-modal-gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sr-modal-body a:hover {
    color: var(--sr-modal-gold-light);
}

/* Custom Scrollbar for Modal Body */
.sr-modal-body::-webkit-scrollbar {
    width: 8px;
}

.sr-modal-body::-webkit-scrollbar-track {
    background: linear-gradient(to top, rgba(69, 0, 134, 0.4) 0%, rgba(69, 0, 134, 0.2) 100%);
    border-radius: 4px;
}

.sr-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 4px;
}

.sr-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* =====================================================
   Modal Footer
   ===================================================== */
.sr-modal-footer {
    padding: 20px var(--sr-modal-padding);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--sr-modal-gap);
    background: linear-gradient(to top, rgba(69, 0, 134, 0.4) 0%, rgba(69, 0, 134, 0.2) 100%);
    flex-shrink: 0;
}

.sr-modal-footer-left {
    justify-content: flex-start;
}

.sr-modal-footer-center {
    justify-content: center;
}

.sr-modal-footer-between {
    justify-content: space-between;
}

/* =====================================================
   Modal Buttons
   ===================================================== */
.sr-modal-btn {
    font-family: var(--sr-modal-font-body);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--sr-modal-transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

/* Primary Button - Gold */
.sr-modal-btn-primary {
    background: linear-gradient(135deg, var(--sr-modal-gold), var(--sr-modal-gold-dark));
    color: var(--sr-modal-purple-dark);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.sr-modal-btn-primary:hover {
    background: linear-gradient(135deg, var(--sr-modal-gold-light), var(--sr-modal-gold));
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.sr-modal-btn-primary:active {
    transform: translateY(0);
}

/* =====================================================
   Header buttons - Standardized across all list modals and wizards
   ===================================================== */
.worlds-header-btn, 
.agents-header-btn, 
.wizard-back-btn,
.back-btn {
    font-family: var(--sr-modal-font-body, 'Inter', sans-serif);
    background: transparent;
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--sr-modal-transition-normal, 0.3s ease);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.worlds-header-btn:hover, 
.agents-header-btn:hover, 
.wizard-back-btn:hover,
.back-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--sr-modal-gold, #ffd700);
    color: var(--sr-modal-gold, #ffd700);
    transform: translateY(-2px);
}

.worlds-header-btn:active, 
.agents-header-btn:active, 
.wizard-back-btn:active,
.back-btn:active {
    transform: translateY(0);
}

/* Specific Create Button variant for list headers */
.worlds-header-btn.create-btn, 
.agents-header-btn.create-btn,
.create-btn {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--sr-modal-gold, #ffd700);
    color: var(--sr-modal-gold, #ffd700);
}

.worlds-header-btn.create-btn:hover, 
.agents-header-btn.create-btn:hover,
.create-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

/* Secondary Button - Outline */
.sr-modal-btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 215, 0, 0.4);
}

.sr-modal-btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--sr-modal-gold);
    color: var(--sr-modal-gold);
}

/* Ghost Button - Minimal */
.sr-modal-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sr-modal-btn-ghost:hover {
    color: var(--sr-modal-gold);
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--sr-modal-gold);
}

/* Danger Button - Red */
.sr-modal-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.sr-modal-btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* Success Button - Green */
.sr-modal-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.sr-modal-btn-success:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

/* Button Sizes */
.sr-modal-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.sr-modal-btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.sr-modal-btn-full {
    width: 100%;
}

/* Disabled State */
.sr-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* =====================================================
   Modal Size Variants
   ===================================================== */
.sr-modal-sm .sr-modal-container {
    max-width: 400px;
}

.sr-modal-md .sr-modal-container {
    max-width: 600px;
}

.sr-modal-lg .sr-modal-container {
    max-width: 900px;
}

.sr-modal-xl .sr-modal-container {
    max-width: 1200px;
}

.sr-modal-fullscreen .sr-modal-container {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
}

/* =====================================================
   Modal Theme Variants
   ===================================================== */

/* Warning Theme */
.sr-modal-warning .sr-modal-container {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(245, 158, 11, 0.15);
}

.sr-modal-warning .sr-modal-title {
    color: #f59e0b;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.sr-modal-warning .sr-modal-header {
    border-bottom-color: rgba(245, 158, 11, 0.2);
}

/* Error Theme */
.sr-modal-error .sr-modal-container {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(239, 68, 68, 0.15);
}

.sr-modal-error .sr-modal-title {
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.sr-modal-error .sr-modal-header {
    border-bottom-color: rgba(239, 68, 68, 0.2);
}

/* Success Theme */
.sr-modal-success .sr-modal-container {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(16, 185, 129, 0.15);
}

.sr-modal-success .sr-modal-title {
    color: #10b981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.sr-modal-success .sr-modal-header {
    border-bottom-color: rgba(16, 185, 129, 0.2);
}

/* Purple Theme (Alternative Brand) */
.sr-modal-purple .sr-modal-container {
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(138, 43, 226, 0.2);
}

.sr-modal-purple .sr-modal-header {
    background: linear-gradient(90deg, rgba(138, 43, 226, 0.15) 0%, rgba(75, 0, 130, 0.1) 100%);
    border-bottom-color: rgba(138, 43, 226, 0.2);
}

/* =====================================================
   Animations
   ===================================================== */
@keyframes sr-modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes sr-modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes sr-modalSlideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes sr-modalSlideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(40px);
        opacity: 0;
    }
}

@keyframes sr-modalSlideIn {
    from {
        transform: translateX(-40px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes sr-modalScaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animation Variants */
.sr-modal-animate-scale .sr-modal-container {
    animation: sr-modalScaleIn 0.3s ease forwards;
}

.sr-modal-animate-slide .sr-modal-container {
    animation: sr-modalSlideIn 0.4s ease forwards;
}

/* Closing Animation */
.sr-modal.sr-modal-closing {
    animation: sr-modalFadeOut 0.2s ease forwards;
}

.sr-modal.sr-modal-closing .sr-modal-container {
    animation: sr-modalSlideDown 0.2s ease forwards;
}

/* =====================================================
   Form Elements within Modals
   ===================================================== */
.sr-modal-form-group {
    margin-bottom: 20px;
}

.sr-modal-label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--sr-modal-font-body);
    font-weight: 600;
    font-size: 14px;
    color: var(--sr-modal-gold);
}

.sr-modal-input,
.sr-modal-select,
.sr-modal-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    background: rgba(10, 0, 20, 0.6);
    color: #ffffff;
    font-size: 14px;
    font-family: var(--sr-modal-font-body);
    transition: all var(--sr-modal-transition-normal);
}

.sr-modal-input:focus,
.sr-modal-select:focus,
.sr-modal-textarea:focus {
    outline: none;
    border-color: var(--sr-modal-gold);
    background: rgba(10, 0, 20, 0.8);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.sr-modal-input::placeholder,
.sr-modal-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.sr-modal-textarea {
    min-height: 100px;
    resize: vertical;
}

/* =====================================================
   Utility Classes
   ===================================================== */
.sr-modal-text-center {
    text-align: center;
}

.sr-modal-text-gold {
    color: var(--sr-modal-gold);
}

.sr-modal-text-muted {
    color: rgba(255, 255, 255, 0.6);
}

.sr-modal-text-purple {
    color: #a855f7;
}

/* Section Title for grouped content */
.sr-modal-section-title {
    font-family: var(--sr-modal-font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sr-modal-gold);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

/* Character counter */
.sr-modal-char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* Notice/Warning box */
.sr-modal-notice {
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #fbbf24;
}

.sr-modal-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    margin: 20px 0;
}

.sr-modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.sr-modal-icon-warning {
    color: #f59e0b;
}

.sr-modal-icon-error {
    color: #ef4444;
}

.sr-modal-icon-success {
    color: #10b981;
}

.sr-modal-icon-info {
    color: var(--sr-modal-gold);
}

/* =====================================================
   Nested Modal Support
   ===================================================== */
.sr-modal-nested {
    z-index: var(--sr-modal-z-nested);
}

.sr-modal-nested .sr-modal-overlay {
    z-index: calc(var(--sr-modal-z-nested) + 1);
}

.sr-modal-nested .sr-modal-container {
    z-index: calc(var(--sr-modal-z-nested) + 2);
}

/* =====================================================
   Accessibility
   ===================================================== */
.sr-modal:focus {
    outline: none;
}

.sr-modal-container:focus {
    outline: none;
}

/* Focus trap indicator */
.sr-modal-focus-trap {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Screen reader only text */
.sr-modal-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sr-modal-container {
        border-width: 3px;
        border-color: var(--sr-modal-gold);
    }
    
    .sr-modal-btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sr-modal,
    .sr-modal-container,
    .sr-modal-btn,
    .sr-modal-close {
        animation: none !important;
        transition: none !important;
    }
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 768px) {
    .sr-modal-container {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .sr-modal-header {
        padding: 16px 20px;
    }
    
    .sr-modal-title {
        font-size: 22px;
    }
    
    .sr-modal-body {
        padding: 20px;
    }
    
    .sr-modal-footer {
        padding: 16px 20px;
        flex-wrap: wrap;
    }
    
    .sr-modal-btn {
        padding: 10px 20px;
    }
    
    .sr-modal-footer .sr-modal-btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .sr-modal-container {
        width: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
    }
    
    .sr-modal-header {
        padding: 14px 16px;
    }
    
    .sr-modal-title {
        font-size: 20px;
    }
    
    .sr-modal-close {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 20px;
    }
    
    .sr-modal-body {
        padding: 16px;
    }
    
    .sr-modal-footer {
        padding: 14px 16px;
        gap: 8px;
    }
    
    .sr-modal-footer .sr-modal-btn {
        width: 100%;
        flex: none;
    }
}

/* =====================================================
   Print Styles
   ===================================================== */
@media print {
    .sr-modal {
        position: static;
        display: block;
    }
    
    .sr-modal-overlay {
        display: none;
    }
    
    .sr-modal-container {
        box-shadow: none;
        border: 1px solid #000;
        max-height: none;
    }
    
    .sr-modal-close {
        display: none;
    }
}

/* =====================================================
   Unified Wizard Progress Steps
   Consistent styling for all wizard progress indicators
   ===================================================== */

/* Progress Container */
.sr-wizard-progress,
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    background: linear-gradient(180deg, rgba(69, 0, 134, 0.08) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
    position: relative;
    gap: 8px;
}

.sr-wizard-progress::before,
.sr-wizard-progress::after,
.wizard-progress::before,
.wizard-progress::after {
    content: none !important;
    display: none !important;
}

/* Progress Step */
.sr-progress-step,
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 1;
    position: relative;
    outline: none !important;
}

.sr-progress-step::before,
.sr-progress-step::after,
.progress-step::before,
.progress-step::after {
    content: none !important;
    display: none !important;
}

/* Step Circle/Number - Unified styling */
.sr-step-number,
.step-number,
.step-circle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--sr-modal-font-body, 'Inter', sans-serif);
    background: rgba(100, 100, 120, 0.3);
    border: 3px solid rgba(100, 116, 139, 0.5);
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
    text-shadow: none;
}

.sr-step-number::before,
.sr-step-number::after,
.step-number::before,
.step-number::after,
.step-circle::before,
.step-circle::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

/* Step Label - White text for all states */
.sr-step-label,
.step-label {
    font-size: 12px;
    font-weight: 600;
    font-family: var(--sr-modal-font-body, 'Inter', sans-serif);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    max-width: 90px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

/* Active Step - Gold solid color (no gradient inside circle) */
.sr-progress-step.active .sr-step-number,
.sr-progress-step.active .step-number,
.sr-progress-step.active .step-circle,
.progress-step.active .sr-step-number,
.progress-step.active .step-number,
.progress-step.active .step-circle {
    background: var(--sr-modal-gold, #ffd700);
    border-color: var(--sr-modal-gold, #ffd700);
    color: #1a1a2e;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
}

.sr-progress-step.active .sr-step-number::before,
.sr-progress-step.active .step-number::before,
.sr-progress-step.active .step-circle::before,
.progress-step.active .sr-step-number::before,
.progress-step.active .step-number::before,
.progress-step.active .step-circle::before {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
}

.sr-progress-step.active .sr-step-label,
.sr-progress-step.active .step-label,
.progress-step.active .sr-step-label,
.progress-step.active .step-label {
    color: #ffffff;
    font-weight: 700;
}

/* Completed Step - Purple solid color (no gradient inside circle) */
.sr-progress-step.completed .sr-step-number,
.sr-progress-step.completed .step-number,
.sr-progress-step.completed .step-circle,
.progress-step.completed .sr-step-number,
.progress-step.completed .step-number,
.progress-step.completed .step-circle {
    background: var(--sr-modal-purple-medium, #5f00b9);
    border-color: var(--sr-modal-purple-medium, #5f00b9);
    color: transparent;
    box-shadow: 0 0 15px rgba(95, 0, 185, 0.4);
    overflow: hidden;
}

.sr-progress-step.completed .sr-step-number::after,
.sr-progress-step.completed .step-number::after,
.sr-progress-step.completed .step-circle::after,
.progress-step.completed .sr-step-number::after,
.progress-step.completed .step-number::after,
.progress-step.completed .step-circle::after {
    content: '✓' !important;
    display: flex !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    color: #ffffff;
    font-weight: bold;
    pointer-events: none !important;
}

.sr-progress-step.completed .sr-step-label,
.sr-progress-step.completed .step-label,
.progress-step.completed .sr-step-label,
.progress-step.completed .step-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Progress Line */
.sr-progress-line,
.progress-line {
    flex: 1;
    height: 3px;
    background: rgba(100, 116, 139, 0.3);
    border-radius: 2px;
    position: relative;
    min-width: 20px;
}

/* Completed segment line */
.sr-progress-step.completed + .sr-progress-line,
.sr-progress-step.completed + .progress-line,
.progress-step.completed + .sr-progress-line,
.progress-step.completed + .progress-line {
    background: var(--sr-modal-purple-medium, #5f00b9);
}

/* Active segment line */
.sr-progress-step.active + .sr-progress-line,
.sr-progress-step.active + .progress-line,
.progress-step.active + .sr-progress-line,
.progress-step.active + .progress-line {
    background: rgba(255, 215, 0, 0.3);
}

/* Step Icon (for Adventure wizard) */
.step-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.progress-step.completed .step-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .sr-wizard-progress,
    .wizard-progress {
        padding: 20px 16px;
        gap: 6px;
    }
    
    .sr-step-number,
    .step-number,
    .step-circle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 16px;
        border-width: 2px;
    }
    
    .sr-step-label,
    .step-label {
        font-size: 10px;
        max-width: 70px;
    }
    
    .sr-progress-step.completed .sr-step-number::after,
    .sr-progress-step.completed .step-number::after,
    .sr-progress-step.completed .step-circle::after,
    .progress-step.completed .sr-step-number::after,
    .progress-step.completed .step-number::after,
    .progress-step.completed .step-circle::after {
        font-size: 18px;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .sr-wizard-progress,
    .wizard-progress {
        padding: 16px 12px;
        gap: 4px;
    }
    
    .sr-step-number,
    .step-number,
    .step-circle {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        font-size: 14px;
    }
    
    .sr-step-label,
    .step-label {
        font-size: 9px;
        max-width: 55px;
    }
    
    .sr-progress-step.completed .sr-step-number::after,
    .sr-progress-step.completed .step-number::after,
    .sr-progress-step.completed .step-circle::after,
    .progress-step.completed .sr-step-number::after,
    .progress-step.completed .step-number::after,
    .progress-step.completed .step-circle::after {
        font-size: 16px;
    }
}

/* =====================================================
   Wizard Footer - Standardized across all wizards
   ===================================================== */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    gap: 16px;
    flex-shrink: 0;
}

.wizard-nav {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn-wizard {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--sr-modal-font-body, 'Inter', sans-serif);
    white-space: nowrap;
}

.btn-previous, .btn-prev {
    background: rgba(71, 85, 105, 0.3);
    color: #cbd5e1;
    border: 1px solid #475569;
}

.btn-previous:hover, .btn-prev:hover {
    background: rgba(71, 85, 105, 0.5);
    border-color: #64748b;
    transform: translateY(-2px);
}

.btn-next {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.btn-create {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e;
    font-weight: 700;
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3);
}

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

.btn-wizard:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* =====================================================
   Responsive Design - Unified Breakpoints
   ===================================================== */
@media (max-width: 768px) {
    .wizard-container {
        width: 95% !important;
        max-height: 95vh !important;
    }

    .wizard-header {
        padding: 20px !important;
    }

    .wizard-header h2 {
        font-size: 22px !important;
    }

    .wizard-progress {
        padding: 20px 16px !important;
        gap: 8px !important;
    }

    .step-label {
        font-size: 10px !important;
        max-width: 60px !important;
    }

    .step-circle, .step-number {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        font-size: 16px !important;
    }

    .progress-line {
        min-width: 30px !important;
        margin: 0 8px !important;
        margin-top: 18.5px !important;
    }

    .wizard-content, .worlds-content, .wizard-body {
        padding: 20px !important;
    }

    .wizard-footer {
        padding: 16px 20px !important;
        flex-direction: column-reverse !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .wizard-nav {
        width: 100% !important;
        justify-content: center !important;
    }

    .btn-wizard {
        flex: 1 !important;
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .wizard-progress {
        padding: 16px 12px !important;
    }

    .step-label {
        display: none !important;
    }

    .step-circle, .step-number {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        font-size: 14px !important;
    }

    .progress-line {
        min-width: 20px !important;
        margin: 0 6px !important;
        margin-top: 17.5px !important;
    }
}

