/* Results Page Specific Styles */
.results-card {
    width: 100%;
    max-width: var(--content-width);
    margin: 2rem auto;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: clamp(16px, 4vw, 20px);
    padding: clamp(1rem, 4vw, 2rem);
    text-align: center;
    animation: slideUp 0.6s ease-out;
}

/* Results Header */
.results-header {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.percentage-container {
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

/* Percentage Ring Animation */
.percentage-ring {
    position: relative;
    width: clamp(140px, 40vw, 200px);
    height: clamp(140px, 40vw, 200px);
    margin: 0 auto;
}

.percentage-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.percentage-ring circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.percentage-ring .bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.percentage-ring .progress {
    stroke: var(--current-color);
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s ease;
}

.percentage-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.percentage-value span {
    display: block;
}

#match-percentage {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 700;
    background: var(--current-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 4px;
    line-height: 1;
}

.percentage-value .label {
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-description {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    padding: 0 clamp(0.5rem, 2vw, 1rem);
    color: var(--text-secondary);
}

/* Section Styles */
.section-title {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-color);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    font-weight: 600;
}

/* Visualization Section */
.visualization-section {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border-radius: clamp(12px, 3vw, 16px);
    padding: clamp(1rem, 3vw, 1.5rem);
    margin: clamp(1.5rem, 4vw, 2rem) 0;
}

.icon-grid-wrapper {
    width: 100%;
}

/* Icon Grid */
.icon-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(10, 1fr); /* Fixed 10 columns on desktop */
    gap: clamp(2px, 0.5vw, 4px);
    padding: clamp(0.75rem, 2vw, 1.5rem);
    background: rgba(255, 255, 255, 0.03);
    border-radius: clamp(8px, 2vw, 12px);
}

.person-icon {
    width: clamp(16px, 4vw, 20px);
    height: clamp(16px, 4vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    aspect-ratio: 1; /* Ensure square icons */
}

.person-icon svg {
    width: 100%;
    height: 100%;
    padding: 2px;
    fill: currentColor;
}

/* Default state - dimmed */
.person-icon {
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.8;
}

/* Highlighted state - matches */
.person-icon.highlighted {
    color: var(--current-color);
    opacity: 1;
}

/* Non-highlighted state */
.person-icon:not(.highlighted) {
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.8;
}

/* Reality Check Section */
.reality-check {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: clamp(12px, 3vw, 16px);
    padding: clamp(1rem, 3vw, 1.5rem);
    margin: clamp(1.5rem, 4vw, 2rem) 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.reality-meter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: clamp(0.75rem, 2vw, 1rem);
}

.reality-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.score-number {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 800;
    line-height: 1;
    background: var(--current-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(var(--current-rgb), 0.3);
}

.score-label {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meter-bars {
    display: flex;
    gap: clamp(2px, 1vw, 4px);
    margin: clamp(0.75rem, 2vw, 1rem) 0;
}

.meter-bar {
    width: clamp(16px, 5vw, 24px);
    height: clamp(32px, 10vw, 48px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: clamp(2px, 1vw, 4px);
    transition: all 0.3s ease;
}

.meter-bar.active {
    background: var(--current-gradient);
}

.reality-message {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: var(--text-color);
    margin-top: 1rem;
    text-align: center;
    padding: 0 clamp(0.5rem, 2vw, 1rem);
}

/* Button Styles */
.button-group {
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 2vw, 1rem);
    margin-top: clamp(1.5rem, 4vw, 2rem);
}

.secondary-btn {
    width: 100%;
    padding: clamp(0.75rem, 2.5vw, 1rem);
    border-radius: clamp(8px, 2vw, 12px);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--current-color);
    color: var(--current-color);
}

.secondary-btn:active {
    transform: scale(0.98);
}

/* Touch Device Optimizations */
@media (hover: none) {
    .secondary-btn {
        -webkit-tap-highlight-color: transparent;
    }

    .secondary-btn:active {
        background: rgba(255, 255, 255, 0.05);
        border-color: var(--current-color);
        color: var(--current-color);
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progressive Loading */
.visible {
    animation: progressiveLoad 0.3s ease forwards;
}

@keyframes progressiveLoad {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .results-card {
        margin: 1.5rem auto;
        padding: 1.5rem;
    }

    .icon-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 3px;
    }

    .visualization-section,
    .reality-check {
        margin: 1.5rem 0;
        padding: 1.25rem;
    }

    .meter-bars {
        gap: 3px;
    }

    .meter-bar {
        width: 20px;
        height: 40px;
    }

    .person-icon {
        width: 18px;
        height: 18px;
    }

    .secondary-btn {
        padding: 0.875rem;
    }
}

@media (max-width: 480px) {
    .results-card {
        margin: 1rem auto;
        padding: 1rem;
    }

    .icon-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2px;
    }

    .visualization-section,
    .reality-check {
        margin: 1rem 0;
        padding: 1rem;
    }

    .meter-bars {
        gap: 2px;
    }

    .meter-bar {
        width: 16px;
        height: 32px;
    }

    .reality-message {
        font-size: 1rem;
    }

    .person-icon {
        width: 16px;
        height: 16px;
    }

    .person-icon svg {
        padding: 1px;
    }

    .secondary-btn {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
}
