/* Custom CSS for Superpower Finder */

:root {
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Hero Section */
.hero-section {
    min-height: 80vh;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-visual {
    position: relative;
}

.superpower-icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 300px;
    margin: 0 auto;
}

.icon-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bs-light);
    border: 2px solid var(--bs-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.icon-item:hover {
    transform: scale(1.1);
    background: var(--bs-primary);
    color: white;
}

.icon-item svg {
    width: 32px;
    height: 32px;
}

/* Process Cards */
.process-card {
    padding: 2rem;
    border-radius: 15px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    transition: all 0.3s ease;
}

.process-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.process-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.process-number {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: var(--bs-primary);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Assessment Form */
.assessment-start-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Superpower Preview Cards */
.superpower-preview-card {
    padding: 2rem;
    border-radius: 15px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    transition: all 0.3s ease;
}

.superpower-preview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.card-icon svg {
    width: 28px;
    height: 28px;
}

/* Ranking List for Assessment */
.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--bs-light);
    color: var(--bs-dark);
    border-radius: 8px;
    cursor: move;
    transition: all 0.2s ease;
    user-select: none;
}

.ranking-item:hover {
    background: var(--bs-primary);
    color: white;
    transform: translateX(5px);
}

.ranking-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.ranking-handle {
    margin-right: 1rem;
    color: var(--bs-secondary);
}

.ranking-text {
    flex: 1;
}

/* Results Page Enhancements */
.results-hero {
    position: relative;
    overflow: hidden;
}

.results-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23667eea' fill-opacity='0.05'%3E%3Cpath d='M30 30l15-15v30l-15-15zm-15 15l15-15H0l15 15zm0-30l15 15H0l15-15zm30 0v30l15-15-15-15z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Score Circle Animation */
@keyframes scoreAnimation {
    from {
        background: conic-gradient(var(--bs-primary) 0%, var(--bs-light) 0);
    }
}

.score-circle {
    animation: scoreAnimation 2s ease-out forwards;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
    }
    
    .superpower-icon-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 200px;
    }
    
    .process-card {
        padding: 1.5rem;
    }
    
    .results-hero {
        padding: 2rem;
    }
    
    .card-body.p-5 {
        padding: 2rem !important;
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--bs-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

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

/* Accessibility Enhancements */
.btn:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer,
    .card:not(.superpower-card) {
        display: none !important;
    }
    
    .superpower-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .results-hero {
        background: none !important;
        border: 1px solid #ccc;
    }
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
    .icon-item {
        background: var(--bs-dark);
        border-color: var(--bs-light);
    }
    
    .process-card,
    .superpower-preview-card {
        background: var(--bs-dark);
        border-color: var(--bs-secondary);
    }
    
    .ranking-item {
        background: var(--bs-dark);
    }
}

/* Smooth animations */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Focus indicators for better accessibility */
.btn:focus-visible,
.form-control:focus-visible,
.form-check-input:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}
