/* Base layout */
.xp-score-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 30px auto;
    width: 100%;
}
 
.xp-score-grid {
    display: grid;
    grid-template-columns: 450px 1fr;
    min-height: 300px;
}
 
/* Image container styles */
.xp-score-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px 0 0 12px;
    background: #f8f9fa;
}
 
.xp-score-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
 
.xp-score-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
}
 
.xp-score-title {
    position: absolute;
    bottom: 30px;
    left: 30px;
    color: white;
    font-size: 32px;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
 
/* Content container styles */
.xp-score-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
 
.xp-score-text-container {
    margin-bottom: 30px;
}
 
.xp-score-description {
    color: #333;
    line-height: 1.7;
    margin: 0 0 20px 0;
    font-size: 16px;
}
 
/* Bottom content layout */
.xp-score-bottom {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    margin-top: auto;
}
 
.xp-score-result {
    flex: 0 0 250px;
    width: 250px;
}
 
/* Standard Display Layout */
.xp-standard-score-container {
    background: #f0f9ff;
    padding: 15px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}
 
.xp-standard-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
 
.xp-standard-score-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
}
 
.xp-standard-score-value {
    font-size: 1.25rem !important;
    font-weight: 600;
    line-height: 1.2;
}
 
.xp-standard-score-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
 
.xp-standard-score-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s ease;
}
 
.xp-standard-score-time {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}
 
.xp-standard-score-time svg {
    flex-shrink: 0;
}
 
/* Learner Display Layout */
.learner-score-container {
    background-color: rgb(240, 253, 244);
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid rgb(34, 197, 94);
    width: 100%;
    box-sizing: border-box;
}
 
.learner-result-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
 
.learner-result {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgb(22, 163, 74);
    display: flex;
    align-items: center;
    gap: 4px;
}
 
.learner-time {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}
 
.learner-time svg {
    flex-shrink: 0;
    color: #6b7280;
}
 
/* Video button */
.xp-score-video-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
}
 
.xp-score-btn-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #4F46E5;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}
 
.xp-score-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
 
.xp-score-icon i {
    color: white;
    font-size: 10px;
}
 
.xp-score-btn-text {
    color: white;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
 
/* Standard Display Colors */
.pill-red { color: #dc2626; background-color: #fecaca; }
.bar-red { background-color: #ef4444; }
 
.pill-orange { color: #ea580c; background-color: #fed7aa; }
.bar-orange { background-color: #f97316; }
 
.pill-yellow { color: #ca8a04; background-color: #fef08a; }
.bar-yellow { background-color: #eab308; }
 
.pill-green { color: #16a34a; background-color: #bbf7d0; }
.bar-green { background-color: #22c55e; }
 
.pill-emerald { color: #059669; background-color: #a7f3d0; }
.bar-emerald { background-color: #10b981; }

/* Score value colors */
.xp-standard-score-value.emerald {
    color: #059669 !important;
}

.xp-standard-score-value.green {
    color: #16a34a !important;
}

.xp-standard-score-value.yellow {
    color: #ca8a04 !important;
}

.xp-standard-score-value.orange {
    color: #ea580c !important;
}

.xp-standard-score-value.red {
    color: #dc2626 !important;
}

/* Ensure font size consistency */
.xp-standard-score-value.emerald,
.xp-standard-score-value.green,
.xp-standard-score-value.yellow,
.xp-standard-score-value.orange,
.xp-standard-score-value.red {
    font-size: 1.25rem !important;
}

/* Trait card specific button styles */
.trait1-card .xp-score-video-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
    margin-top: 20px;
}

.trait1-card .xp-score-btn-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #4F46E5;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.trait1-card .xp-score-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trait1-card .xp-score-icon i {
    color: white;
    font-size: 10px;
}

.trait1-card .xp-score-btn-inner span {
    color: white;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hover effects for trait card buttons */
.trait1-card .xp-score-video-btn:hover .xp-score-btn-inner {
    background: #4338ca;
}
 
/* Responsive styles */
@media (max-width: 1024px) {
    .xp-score-grid {
        grid-template-columns: 350px 1fr;
    }
    
    .xp-score-content {
        padding: 30px;
    }
}
 
@media (max-width: 768px) {
    .xp-score-grid {
        grid-template-columns: 1fr;
    }
    
    .xp-score-image-container {
        height: 200px;
        border-radius: 12px 12px 0 0;
    }
    
    .xp-score-content {
        padding: 25px;
    }
    
    .xp-score-text-container {
        margin-bottom: 20px;
    }
    
    .xp-score-bottom {
        flex-direction: column;
        gap: 15px;
        width: 100% !important;
    }
    
    .xp-score-result {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
    
    .xp-score-video-btn {
        width: 100%;
    }
    
    .xp-score-btn-inner {
        justify-content: center;
    }

    .xp-standard-score-container {
        width: 100% !important;
        margin: 0;
    }

    .trait1-card .xp-score-video-btn {
        width: 100%;
    }
    
    .trait1-card .xp-score-btn-inner {
        justify-content: center;
    }
}
 
@media (max-width: 480px) {
    .xp-score-section {
        margin: 15px auto;
    }

    .xp-score-content {
        padding: 20px;
    }
    
    .xp-score-title {
        font-size: 24px;
        left: 20px;
        bottom: 20px;
    }
    
    .xp-score-description {
        font-size: 14px;
    }

    .xp-score-bottom {
        gap: 12px;
    }

    .xp-standard-score-container,
    .learner-score-container {
        padding: 12px;
    }

    .xp-score-btn-inner {
        padding: 8px 12px;
    }
}
 
@media (max-width: 360px) {
    .xp-score-content {
        padding: 15px;
    }

    .xp-score-title {
        font-size: 20px;
        left: 15px;
        bottom: 15px;
    }

    .xp-standard-score-time,
    .learner-time {
        flex-wrap: wrap;
    }
}

/* Fixed widths for mobile */
@media (max-width: 768px) {
    .xp-standard-score-container.emerald,
    .xp-standard-score-container.green,
    .xp-standard-score-container.yellow,
    .xp-standard-score-container.orange,
    .xp-standard-score-container.red,
    .xp-standard-score-container.pill-emerald,
    .xp-standard-score-container.pill-green,
    .xp-standard-score-container.pill-yellow,
    .xp-standard-score-container.pill-orange,
    .xp-standard-score-container.pill-red {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}

/* Additional mobile fixes */
@media (max-width: 768px) {
    .xp-score-content > a,
    .xp-score-bottom > a {
        display: block !important;
        width: 100% !important;
    }

    .xp-score-result {
        width: 100% !important;
        flex: 1 1 100% !important;
    }

    #standardDisplay.xp-standard-score-container {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}

/* Trait card styles */
.trait1-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.trait1-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
}

.trait1-image-block {
    position: relative;
}

.trait1-image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    display: block; /* Add this */
}

.trait1-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.trait1-image-overlay h2 {
    color: white;
    margin: 0;
    font-size: 28px;
}

.trait1-text {
    padding: 30px 30px 30px 0;
}

.trait1-text h3 {
    margin: 0 0 15px 0;
    color: #333;
}

    .trait1-text p {
    color: #333;
    line-height: 1.6;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: normal;
    font-size: 16px;
}

.video-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.video-btn-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #4F46E5;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .trait1-content {
        grid-template-columns: 1fr;
    }
    
    .trait1-image-block {
        height: 200px;
    }
    
    .trait1-text {
        padding: 20px;
    }
}

.xp-score-video-btn,
.trait1-text .xp-score-video-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
}

.xp-score-btn-inner,
.trait1-text .xp-score-btn-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #4F46E5;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.xp-score-icon,
.trait1-text .xp-score-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xp-score-icon i,
.trait1-text .xp-score-icon i {
    color: white;
    font-size: 10px;
}

.xp-score-btn-text,
.trait1-text .xp-score-btn-text {
    color: white;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hover effects */
.xp-score-video-btn:hover .xp-score-btn-inner,
.trait1-text .xp-score-video-btn:hover .xp-score-btn-inner {
    background: #4338ca;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .xp-score-video-btn,
    .trait1-text .xp-score-video-btn {
        width: 100%;
    }
    
    .xp-score-btn-inner,
    .trait1-text .xp-score-btn-inner {
        justify-content: center;
    }
}