/* Studio Enhanced Styles - Mobile First with Wow Factors */

/* Mobile First Base */
.studio-container {
    padding: 1rem;
    max-width: 100%;
}

/* Smooth Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Wow Factor: Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 255, 246, 0.2);
    border-color: rgba(0, 255, 246, 0.3);
}

/* Wow Factor: Gradient Buttons */
.btn-gradient {
    background: linear-gradient(135deg, #00fff6, #764ba2);
    background-size: 200% 200%;
    animation: shimmer 3s linear infinite;
    border: none;
    color: #000;
    font-weight: 800;
    padding: 1rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

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

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

.btn-gradient:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 255, 246, 0.4);
}

.btn-gradient:active {
    transform: scale(0.98);
}

/* Mobile-First Wizard Layout */
.wizard-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
}

/* Sticky Preview on Mobile */
.preview-container {
    position: relative;
    background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.3));
    border: 1px solid rgba(0, 255, 246, 0.3);
    border-radius: 20px;
    padding: 1.5rem;
    min-height: 300px;
    display: flex;
    align-items: flex-start; /* Top aligned instead of center */
    justify-content: center;
    order: -1; /* Preview first on mobile */
    padding-top: 2rem; /* Add top padding for breathing room */
}

/* Wow Factor: 3D Transform on Hover */
.preview-canvas {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.preview-canvas:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(5deg);
}

/* Mobile-First Form Controls */
.control-group {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease-out;
}

.control-group h3 {
    color: var(--cyan);
    font-size: 1.125rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group h3::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(180deg, var(--cyan), var(--purple));
    border-radius: 2px;
}

/* Enhanced Input Fields */
.input-enhanced {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 255, 246, 0.2);
    border-radius: 12px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s;
}

.input-enhanced:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(0, 255, 246, 0.1);
    transform: translateY(-2px);
}

.input-enhanced::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Wow Factor: Option Grid with Hover Effects */
.option-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.option-item {
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 255, 246, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.option-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 255, 246, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.option-item:hover::before {
    width: 200%;
    height: 200%;
}

.option-item:hover {
    border-color: var(--cyan);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 255, 246, 0.3);
}

.option-item.selected {
    border-color: var(--cyan);
    background: rgba(0, 255, 246, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 246, 0.4);
}

.option-item.selected::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background: var(--cyan);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
}

/* Wow Factor: Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 255, 246, 0.2);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Wow Factor: Success Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 4;
    stroke: var(--cyan);
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--cyan);
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.success-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 4;
    stroke-miterlimit: 10;
    stroke: var(--cyan);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 30px var(--cyan); }
}

/* Mobile-First Download Button */
.download-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 255, 246, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1000;
    animation: float 3s ease-in-out infinite;
}

.download-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 255, 246, 0.6);
}

.download-btn:active {
    transform: scale(0.95);
}

/* Tablet and Up */
@media (min-width: 768px) {
    .studio-container {
        padding: 2rem;
    }
    
    .wizard-layout {
        flex-direction: row;
        gap: 3rem;
        padding: 2rem;
    }
    
    .preview-container {
        position: sticky;
        top: 2rem;
        order: 1;
        min-height: 500px;
    }
    
    .option-grid-enhanced {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .wizard-layout {
        grid-template-columns: 1fr 1.5fr;
    }
    
    .option-grid-enhanced {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* Wow Factor: Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.9);
    color: var(--cyan);
    border: 1px solid var(--cyan);
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* Wow Factor: Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 255, 246, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-radius: 2px;
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--cyan);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .glass-card {
        background: rgba(0, 0, 0, 0.5);
    }
}

/* Touch Feedback */
@media (hover: none) {
    .option-item:active {
        transform: scale(0.95);
    }
    
    .btn-gradient:active {
        transform: scale(0.95);
    }
}
