﻿/* ===========================
   DASHBOARD CREATE v2
   Passend zum Design-System
   =========================== */

/* --- MODAL --- */
.modal {
    --bs-modal-bg: transparent;
    --bs-backdrop-opacity: 0.6;
}

.modal-backdrop {
    backdrop-filter: blur(8px);
}

.modal-dialog {
    animation: slideInDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#createServerModal .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

#createServerModal .modal-header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 1.75rem;
}

#createServerModal .modal-title {
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.3rem;
}

#createServerModal .modal-body {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 2rem 1.75rem;
    min-height: 350px;
}

#createServerModal .modal-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 1.25rem 1.75rem;
    gap: 0.75rem;
}

/* --- GAME INFO BOX --- */
.game-info-box {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid var(--border);
    animation: slideUp 0.5s ease;
}

#modalGameImage {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-smooth);
}

#modalGameImage:hover {
    transform: scale(1.08);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

#modalGameName {
    color: var(--primary-light);
    font-size: 1.4rem;
    font-weight: 800;
    margin-top: 1rem;
}

/* --- FORM --- */
.form-content {
    animation: fadeIn 0.4s ease;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    color: var(--primary-light);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 0.5rem;
}

#charCounter {
    color: var(--primary-light);
    font-weight: 700;
}

/* --- CUSTOM ALERT --- */
.alert-custom {
    background: var(--primary-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.alert-info-custom {
    color: var(--primary-light);
}

.alert-info-custom strong {
    color: var(--text-primary);
    font-weight: 700;
}

.alert-info-custom i {
    color: var(--primary-light);
}

/* Error alerts */
#modalErrorAlert {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger);
    border-radius: var(--radius-md);
    padding: 1rem;
    animation: slideUp 0.3s ease;
}

#modalErrorAlert .alert-heading {
    color: var(--danger);
    font-weight: 700;
}

/* --- PROGRESS --- */
.progress-content {
    animation: fadeIn 0.4s ease;
}

.progress-title {
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* Spinner Dots */
.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin: 2rem 0;
    height: 3rem;
}

.spinner-wrapper .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    animation: dotBounce 1.4s infinite cubic-bezier(0.4, 0, 0.6, 1);
    box-shadow: 0 2px 8px var(--primary-glow-strong);
}

.spinner-wrapper .dot:nth-child(1) { animation-delay: -0.32s; }
.spinner-wrapper .dot:nth-child(2) { animation-delay: -0.16s; }
.spinner-wrapper .dot:nth-child(3) { animation-delay: 0s; }

@keyframes dotBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
    30% { transform: translateY(-16px); opacity: 1; }
}

/* Progress Bar Override */
#createServerModal .progress {
    height: 36px;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

#createServerModal .progress-bar {
    font-weight: 800;
    font-size: 0.85rem;
}

.progress-text {
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.phase-text {
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.95rem;
}

/* --- PROGRESS STEPS --- */
.progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.25rem 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.step-item {
    text-align: center;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.step-item.active {
    opacity: 1;
}

.step-item.completed {
    opacity: 1;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-weight: 800;
    margin: 0 auto 0.5rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.step-item.active .step-indicator {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow-strong);
    animation: stepPulse 2s ease-in-out infinite;
}

.step-item.completed .step-indicator {
    background: var(--success);
    border-color: var(--success);
    color: white;
    box-shadow: 0 4px 12px var(--success-bg);
}

@keyframes stepPulse {
    0%, 100% { box-shadow: 0 4px 12px var(--primary-glow); }
    50% { box-shadow: 0 4px 20px var(--primary-glow-strong); }
}

.step-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.step-item.active .step-label {
    color: var(--primary-light);
}

.step-item.completed .step-label {
    color: var(--success);
}

/* --- RESPONSIVE --- */
@media (max-width: 576px) {
    #createServerModal .modal-body {
        padding: 1.5rem;
        min-height: auto;
    }

    #createServerModal .modal-header {
        padding: 1.25rem;
    }

    .progress-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* --- ANIMATIONS --- */
@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}