/**
 * Enhanced Personality Report Modal Styling
 * Cosmic theme with dynamic backgrounds and color-coded accuracy meters
 */

/* Dynamic Cosmic Background Animation */
@keyframes cosmicShift {
    0% { background: linear-gradient(135deg, #1a0033, #000000, #330066); }
    25% { background: linear-gradient(135deg, #000033, #1a0033, #000066); }
    50% { background: linear-gradient(135deg, #330033, #000066, #1a0033); }
    75% { background: linear-gradient(135deg, #000066, #330033, #000033); }
    100% { background: linear-gradient(135deg, #1a0033, #000000, #330066); }
}

/* Modal Enhancements */
#poc-report-modal {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    animation: cosmicShift 10s ease-in-out infinite;
}

#poc-report-modal .modal-content {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid;
    border-image: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff) 1;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 0 50px rgba(255, 0, 255, 0.3),
        inset 0 0 50px rgba(0, 255, 255, 0.1);
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Personality Report Container */
.personality-report {
    padding: 30px;
    color: #ffffff;
}

/* Report Header */
.report-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 0, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.report-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 255, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.report-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid;
    border-image: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff) 1;
    object-fit: cover;
    box-shadow: 
        0 0 30px rgba(255, 0, 255, 0.5),
        inset 0 0 20px rgba(0, 255, 255, 0.2);
    animation: avatarGlow 2s ease-in-out infinite alternate;
}

@keyframes avatarGlow {
    0% { 
        box-shadow: 
            0 0 30px rgba(255, 0, 255, 0.5),
            inset 0 0 20px rgba(0, 255, 255, 0.2);
    }
    100% { 
        box-shadow: 
            0 0 50px rgba(255, 0, 255, 0.8),
            inset 0 0 30px rgba(0, 255, 255, 0.4);
    }
}

.report-info h2 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

.report-details {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Overall Accuracy Display */
.report-accuracy {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.accuracy-label {
    font-weight: 600;
    color: #ffffff;
    font-size: 1.1rem;
}

.accuracy-value {
    font-size: 1.8rem;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 20px;
    text-shadow: 0 0 10px currentColor;
    position: relative;
    overflow: hidden;
}

.accuracy-value.high {
    background: linear-gradient(45deg, #00ff88, #00cc66);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

.accuracy-value.medium {
    background: linear-gradient(45deg, #ffaa00, #ff8800);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.6);
}

.accuracy-value.low {
    background: linear-gradient(45deg, #ff4444, #cc2222);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.6);
}

/* Report Sections */
.report-section {
    margin-bottom: 40px;
}

.report-section h3 {
    font-size: 1.8rem;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

.report-section h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    border-radius: 2px;
}

/* Parameters Grid */
.parameters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.parameter-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 0, 255, 0.3);
    border-radius: 15px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.parameter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
    opacity: 0.8;
}

.parameter-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 
        0 10px 30px rgba(255, 0, 255, 0.2),
        0 0 50px rgba(0, 255, 255, 0.1);
}

.parameter-card h4 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.parameter-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.prediction-text,
.public-text {
    padding: 15px;
    border-radius: 10px;
    position: relative;
}

.prediction-text {
    background: rgba(255, 0, 255, 0.1);
    border-left: 4px solid #ff00ff;
}

.public-text {
    background: rgba(0, 255, 255, 0.1);
    border-left: 4px solid #00ffff;
}

.prediction-text strong,
.public-text strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prediction-text p,
.public-text p {
    color: #cccccc;
    line-height: 1.6;
    margin: 0;
}

/* Parameter Accuracy Meters */
.param-accuracy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.param-accuracy span {
    font-weight: 600;
    color: #ffffff;
    font-size: 1.1rem;
}

.meter {
    width: 120px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.meter-fill {
    height: 100%;
    border-radius: 10px;
    position: relative;
    transition: width 1s ease-out;
    box-shadow: 0 0 10px currentColor;
}

.meter-fill.high {
    background: linear-gradient(90deg, #00ff88, #00cc66);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.8);
}

.meter-fill.medium {
    background: linear-gradient(90deg, #ffaa00, #ff8800);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.8);
}

.meter-fill.low {
    background: linear-gradient(90deg, #ff4444, #cc2222);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.8);
}

.meter-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: meterShine 2s ease-in-out infinite;
}

@keyframes meterShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Forecast Grid */
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.forecast-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.forecast-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #00ffff);
}

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

.forecast-card h4 {
    font-size: 1.4rem;
    color: #00ffff;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.forecast-card p {
    color: #cccccc;
    line-height: 1.6;
    margin: 0;
}

/* Modal Close Button Enhancement */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid rgba(255, 0, 0, 0.5);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.4);
    border-color: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .report-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .parameters-grid {
        grid-template-columns: 1fr;
    }
    
    .forecast-grid {
        grid-template-columns: 1fr;
    }
    
    .param-accuracy {
        flex-direction: column;
        gap: 10px;
    }
    
    .meter {
        width: 100%;
    }
}

/* Loading Animation for Cards */
@keyframes cardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.parameter-card,
.forecast-card {
    animation: cardFadeIn 0.6s ease-out forwards;
}

.parameter-card:nth-child(1) { animation-delay: 0.1s; }
.parameter-card:nth-child(2) { animation-delay: 0.2s; }
.parameter-card:nth-child(3) { animation-delay: 0.3s; }
.parameter-card:nth-child(4) { animation-delay: 0.4s; }
.parameter-card:nth-child(5) { animation-delay: 0.5s; }
.parameter-card:nth-child(6) { animation-delay: 0.6s; }
.parameter-card:nth-child(7) { animation-delay: 0.7s; }
.parameter-card:nth-child(8) { animation-delay: 0.8s; }
.parameter-card:nth-child(9) { animation-delay: 0.9s; }

.forecast-card:nth-child(1) { animation-delay: 1.0s; }
.forecast-card:nth-child(2) { animation-delay: 1.1s; }
.forecast-card:nth-child(3) { animation-delay: 1.2s; }
