/* Personality Quiz Styles */

/* Quiz cards */
.personality-quiz-section {
    margin-top: 2rem;
    padding: 1rem 0;
}

.personality-quiz-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    cursor: pointer;
    height: 100%;
}

.personality-quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Quiz listing page */
.personality-quizzes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.personality-filters-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.category-select {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    min-width: 200px;
    appearance: none;
    background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    background-size: 8px 10px;
    cursor: pointer;
}

.personality-quizzes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Quiz detail page */
.personality-quiz-container {
    max-width: 1020px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.personality-quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.personality-quiz-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.personality-quiz-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

.personality-quiz-image {
    height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 2rem;
    position: relative;
}

.personality-quiz-overlay {
    background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.5));
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.personality-quiz-content {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.personality-quiz-intro {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Game interface */
.personality-game-container {
    max-width: 1020px;
    margin: 0 auto;
    padding: 2rem .2rem;
}

.personality-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.personality-game-title {
    font-size: 1.8rem;
}

.personality-question-counter {
    font-size: 1.2rem;
    font-weight: bold;
    color: #555;
}

.personality-game-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Desktop/Mobile visibility helpers */
.desktop-only {
    display: block !important;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .personality-game-content {
        grid-template-columns: 1fr;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    /* Style the mobile radar container */
    .personality-radar-container.mobile-only {
        margin-top: 2rem;
    }
}

.personality-question-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.personality-question {
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.question-image {
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.answer-options {
    display: grid;
    gap: 1rem;
}

.personality-answer-option {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.personality-answer-option:hover {
    border-color: #aaa;
}

.personality-answer-option.selected {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

.personality-radar-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.radar-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.radar-description {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #777;
    text-align: center;
    flex-grow: 1;
}

#radar-chart {
    margin: 0 auto;
    max-width: 100%;
    flex-grow: 1;
}

.personality-navigation {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.personality-navigation button {
    margin: 0 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Results page */
.personality-results-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.personality-results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

/* Guest signup prompt */
.guest-signup-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    flex-wrap: wrap;
}

.guest-signup-prompt i {
    margin-right: 0.5rem;
}

.guest-signup-prompt strong {
    margin-right: 0.5rem;
}

.guest-signup-prompt .btn {
    margin-left: 1rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .guest-signup-prompt {
        flex-direction: column;
        text-align: center;
    }
    
    .guest-signup-prompt .btn {
        margin-top: 1rem;
        margin-left: 0;
    }
}

.quiz-name {
    font-size: 1.5rem;
    color: #777;
}

.outcome-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.outcome-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.outcome-overlay {
    background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.5));
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.outcome-details {
    padding: 2rem;
}

.outcome-name {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.outcome-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

/* Share container styles */
.share-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.share-container h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.share-btn.facebook {
    background-color: #3b5998;
}

.share-btn.facebook:hover {
    background-color: #2d4373;
}

/* Twitter button styling is now handled inline */
.share-btn.twitter {
    /* Background-color is set inline */
}

.share-btn.twitter:hover {
    opacity: 0.9;
}

.share-btn.copy {
    background-color: #6c757d;
}

.share-confirmation {
    color: #28a745;
    font-weight: bold;
    margin-top: 0.5rem;
    display: none;
}

/* Stats container styles */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-direction: column;
    }
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.results-actions button, 
.results-actions a {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-block;
}

/* General buttons - using site's color scheme rather than green */
.personality-game-container .btn-primary,
.personality-quiz-container .btn-primary,
.personality-results-container .btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.personality-game-container .btn-primary:hover,
.personality-quiz-container .btn-primary:hover,
.personality-results-container .btn-primary:hover {
    background-color: #2980b9;
}

.personality-game-container .btn-primary:disabled,
.personality-quiz-container .btn-primary:disabled,
.personality-results-container .btn-primary:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.personality-game-container .btn-secondary,
.personality-quiz-container .btn-secondary,
.personality-results-container .btn-secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.personality-game-container .btn-secondary:hover,
.personality-quiz-container .btn-secondary:hover,
.personality-results-container .btn-secondary:hover {
    background-color: #e9ecef;
    border-color: #aaa;
}

.personality-game-container .btn-success,
.personality-quiz-container .btn-success,
.personality-results-container .btn-success {
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.personality-game-container .btn-success:hover,
.personality-quiz-container .btn-success:hover,
.personality-results-container .btn-success:hover {
    background-color: #1976D2;
}

.personality-game-container .btn-success:disabled,
.personality-quiz-container .btn-success:disabled,
.personality-results-container .btn-success:disabled {
    background-color: #90CAF9;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

/* Animated scroll arrow */
.scroll-arrow-container {
    display: none;
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
    transition: transform 0.3s ease;
    position: relative;
}

.scroll-arrow-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    margin-top: -5px; /* Adjust to center on the arrow icon */
}

.scroll-arrow-container.scrolling::after {
    animation: pulseGlow 0.8s ease-out;
}

.scroll-arrow {
    font-size: 2.5rem;
    color: #3498db;
    animation: bounce 2s ease-in-out infinite;
    cursor: pointer;
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.scroll-arrow-container.scrolling .scroll-arrow {
    color: #2ecc71;
    animation: bounceSuccess 0.8s ease-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

@keyframes bounceSuccess {
    0% {
        transform: translateY(0) scale(1);
    }
    30% {
        transform: translateY(-20px) scale(1.2);
    }
    50% {
        transform: translateY(-10px) scale(1.1);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes pulseGlow {
    0% {
        background-color: rgba(46, 204, 113, 0.2);
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.8;
    }
    100% {
        background-color: rgba(46, 204, 113, 0);
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Main content container */
#main-content {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 0 10px;
    display: block; /* Explicitly set display to block */
    position: relative;
    z-index: 2; /* Ensure it's above other elements */
    min-height: 400px;
}

/* Ensure containers get proper display */
.personality-quiz-container,
.personality-game-container,
.personality-results-container {
    width: 100%;
    display: block;
}

/* All outcomes grid section */
.all-outcomes-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.all-outcomes-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.outcomes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .outcomes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .outcomes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .outcomes-grid {
        grid-template-columns: 1fr;
    }
}

.outcome-grid-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.outcome-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.current-outcome {
    border: 3px solid #4CAF50;
    position: relative;
}

.outcome-grid-image {
    height: 150px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.current-outcome-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.outcome-grid-name {
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
    color: #333;
    margin: 0;
}

/* End of outcomes grid */

.stats-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stats-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stats-label {
    color: #777;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Long Description for SEO - styled to be subtle and out of the way at the bottom */
.personality-quiz-long-description {
    margin-top: 5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e9ecef;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #6c757d;
    text-align: left;
    max-width: 100%;
    white-space: pre-wrap; /* Preserve line breaks and spaces */
    opacity: 0.8;
    border-top: 1px solid #e9ecef;
    position: relative;
}

.personality-quiz-long-description::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background-color: #e9ecef;
}

.personality-quiz-long-description p {
    margin: 0;
    text-align: left;
    white-space: pre-wrap; /* Preserve formatting inside paragraphs */
}

/* Make it even more subtle on question pages */
.personality-game-container .personality-quiz-long-description {
    margin-top: 2rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Mobile padding overrides */
@media (max-width: 768px) {
    .personality-quiz-container {
        padding: 1rem 0.5rem;
    }
    
    .personality-question-container {
        padding: 1.5rem;
    }
    
    /* Override inline styles for question images */
    .question-image {
        height: 200px !important;
        background-size: contain !important;
        background-color: #f5f5f5;
    }
}

@media (max-width: 480px) {
    .personality-quiz-container {
        padding: 0.75rem 0.25rem;
    }
    
    .personality-question-container {
        padding: 1rem;
    }
    
    /* Even shorter on small phones to show more width */
    .question-image {
        height: 180px !important;
        background-size: contain !important;
        background-color: #f5f5f5;
    }
}
