/* Success Page Styles for SpellingBee Dashboard */

/* Hide progress bar and header on success page */
/* Modern browsers with :has() support */
.osb-new-dashboard:has(.osb-success-panel) .osb-dashboard-header,
.osb-new-dashboard:has(.osb-success-panel) .osb-arrow-progress-container {
    display: none !important;
}

/* Fallback for older browsers - will be applied via JavaScript */
body.osb-success-page-active .osb-dashboard-header,
body.osb-success-page-active .osb-arrow-progress-container {
    display: none !important;
}

.osb-success-panel {
    padding-top: 0 !important;
    margin-top: -2rem !important;
}

.osb-success-page {
    padding-top: 2rem;
}

/* Celebration Banner */
.osb-celebration-banner {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 3.5rem 2rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: -2rem -2rem 2.5rem -2rem;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.15);
}

.osb-celebration-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.osb-success-header {
    position: relative;
    z-index: 1;
}

.osb-success-check {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.osb-check-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke: white;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.osb-check-path {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

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

.osb-success-icon-wrapper {
    margin: 0 auto 1.5rem;
    width: 120px;
    height: 120px;
}

.osb-success-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0 0 0.875rem 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

.osb-success-subtitle {
    font-size: 1.125rem;
    margin: 0;
    opacity: 0.95;
    line-height: 1.6;
}

.osb-event-name {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.375rem 1.25rem;
    border-radius: 24px;
    margin-top: 0.625rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Success Content */
.osb-success-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Quick Stats */
.osb-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.osb-stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.osb-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.osb-stat-primary { border-color: #059669; background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); }
.osb-stat-info { border-color: #3b82f6; background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); }
.osb-stat-success { border-color: #d97706; background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); }

.osb-stat-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.osb-stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.osb-stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: #1e293b;
    line-height: 1;
    margin-top: 0.25rem;
}

/* Success Cards */
.osb-success-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* Card Headers */
.osb-card-header-elegant {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 1.25rem 1.75rem;
    border-radius: 16px 16px 0 0;
}

.osb-card-header-elegant h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Details Grid */
.osb-details-grid {
    padding: 2rem;
}

.osb-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.osb-detail-row:last-child {
    border-bottom: none;
}

.osb-detail-label {
    font-weight: 600;
    color: #64748b;
    font-size: 0.9375rem;
}

.osb-detail-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.0625rem;
    text-align: right;
}

/* Token Container */
.osb-token-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.osb-token-display {
    background: #f1f5f9;
    color: #334155;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.9375rem;
    letter-spacing: 0.05em;
    border: 1px solid #cbd5e1;
}

.osb-token-copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #1e40af;
    color: white;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.osb-token-copy-btn:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

/* Group Card */
.osb-group-card {
    background: white;
    border: 2px solid #e0e7ff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}

.osb-group-header {
    text-align: center;
    padding: 2rem 2rem 1.75rem;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    margin: -1px -1px 0 -1px;
    border-radius: 14px 14px 0 0;
}

.osb-group-badge-xl {
    display: inline-block;
    background: white;
    color: #4f46e5;
    padding: 0.875rem 2.5rem;
    border-radius: 50px;
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 3px solid #c7d2fe;
}

.osb-group-desc {
    margin: 1rem 0 0 0;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.95;
}

.osb-group-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1.75rem;
    background: linear-gradient(135deg, #fafbff 0%, #f5f7ff 100%);
}

.osb-group-info-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    border: 1px solid #e0e7ff;
    transition: all 0.2s;
}

.osb-group-info-item:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}

.osb-group-info-icon {
    font-size: 2rem;
    line-height: 1;
}

.osb-group-info-label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.osb-group-info-value {
    font-size: 1.25rem;
    font-weight: 900;
    color: #1e293b;
    margin-top: 0.25rem;
}

/* Steps Card */
.osb-steps-card {
    background: white;
    border: 2px solid #e5e7eb;
}

.osb-steps-list {
    padding: 1.75rem;
    background: linear-gradient(135deg, #fafafa 0%, #f9fafb 100%);
}

.osb-step-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.osb-step-item:last-child {
    margin-bottom: 0;
}

.osb-step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.375rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

.osb-step-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.osb-step-content p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

/* Action Buttons */
.osb-success-actions-modern {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.osb-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.osb-action-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
}

.osb-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.3);
}

.osb-action-secondary {
    background: white;
    color: #475569;
    border: 2px solid #cbd5e1;
}

.osb-action-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .osb-celebration-banner {
        padding: 2.5rem 1.5rem 2rem;
        margin: -2rem -1rem 2rem -1rem;
    }

    .osb-success-title {
        font-size: 1.75rem;
    }

    .osb-success-subtitle {
        font-size: 1rem;
    }

    .osb-quick-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .osb-group-badge-xl {
        font-size: 1.5rem;
        padding: 0.625rem 1.75rem;
    }

    .osb-group-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1.25rem;
    }

    .osb-success-actions-modern {
        flex-direction: column;
    }

    .osb-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .osb-celebration-banner {
        background: white;
        color: #1e293b;
        border: 2px solid #10b981;
    }

    .osb-success-check {
        filter: grayscale(1);
    }

    .osb-success-actions-modern,
    .osb-token-copy-btn {
        display: none !important;
    }

    .osb-success-content {
        max-width: 100%;
    }
}
