/* Test Page Specific Styles */

.main-content {
    min-height: calc(100vh - 140px);
}

/* Error message styles */
.error-message {
    text-align: center;
    padding: 3rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.error-message h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-message p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.no-tests {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Statistics Section */
.stats-container {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

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

.stats-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.stats-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(20, 184, 166, 0.1));
    border-radius: 12px;
    border: 2px solid rgba(45, 212, 191, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(45, 212, 191, 0.2);
    border-color: var(--primary-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Filter Section */
.filter-section {
    margin-bottom: 3rem;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Tests Grid */
.tests-grid {
    margin-bottom: 2rem;
}

.test-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.test-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
}

.test-item-image {
    height: 200px;
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.test-item:hover .test-item-image {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: scale(1.02);
}

.test-item-icon {
    font-size: 4rem;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.test-item:hover .test-item-icon {
    transform: scale(1.1);
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.test-item-content {
    padding: 1.5rem;
}

.test-item-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.test-item-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.test-item-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.test-meta-item {
    font-size: 0.8rem;
    color: var(--text-light);
    background: var(--light-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.test-item-button {
    width: 100%;
    padding: 0.75rem;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-item-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

/* Test Interface */
.test-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.back-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--light-teal);
}

.test-info {
    flex: 1;
}

.test-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.test-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Question Container */
.question-container {
    margin-bottom: 2rem;
    padding: 3rem;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.4;
}

.options-container {
    display: grid;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.option-button {
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: var(--white);
    color: var(--text-dark);
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    line-height: 1.5;
}

.option-button:hover {
    border-color: var(--primary-color);
    background: var(--light-teal);
    transform: translateX(4px);
}

.option-button.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(45, 212, 191, 0.3);
}

.option-button.disabled {
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.option-button.pulse {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1.05); }
}

.ripple-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.fade-in-option {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInOption 0.5s ease-out forwards;
}

@keyframes fadeInOption {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-out {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(-100px);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Test Navigation */
.test-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.test-navigation .btn {
    min-width: 120px;
}

/* Results Section */
.results-container {
    max-width: 800px;
    margin: 0 auto;
}

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

.results-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.results-meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

.result-card {
    text-align: center;
    padding: 3rem;
    margin-bottom: 2rem;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-type {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.result-description {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.result-traits {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.trait-tag {
    background: var(--gradient-warm);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

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

/* Recommended Tests */
.recommended-tests {
    margin-top: 3rem;
}

.recommended-tests h3 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* Share Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.share-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .filter-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .test-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .test-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .question-container {
        padding: 2rem 1.5rem;
    }
    
    .question-text {
        font-size: 1.3rem;
    }
    
    .test-navigation {
        flex-direction: column;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .result-traits {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .question-container {
        padding: 1.5rem 1rem;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .result-card {
        padding: 2rem 1rem;
    }
    
    .result-type {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* Enhanced Test Item Styles */
.button-arrow {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.test-item-button:hover .button-arrow {
    transform: translateX(4px);
}

/* Category Header Styles */
.category-header {
    margin-bottom: 2rem;
    text-align: center;
}

.category-info {
    margin-top: 1rem;
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.category-description {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Individual Test Item Styles */
.individual-test-item {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.individual-test-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.individual-test-item:hover::before {
    transform: scaleX(1);
}

.individual-test-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.individual-test-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.test-number {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.test-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.individual-test-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.individual-test-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.individual-test-button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.individual-test-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Back Button Styles */
.back-btn {
    background: var(--light-bg);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Responsive Design for New Elements */
@media (max-width: 768px) {
    .category-title {
        font-size: 2rem;
    }

    .category-icon {
        font-size: 3rem;
    }

    .individual-test-item {
        padding: 1.5rem;
    }

    .test-icon {
        font-size: 2.5rem;
    }

    .individual-test-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .category-title {
        font-size: 1.8rem;
    }

    .category-description {
        font-size: 1rem;
    }

    .individual-test-item {
        padding: 1rem;
    }

    .test-number {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
}

/* Celebration and Confetti Animations */
.celebration-entrance {
    animation: celebrationEntrance 0.8s ease-out;
}

@keyframes celebrationEntrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    50% {
        transform: scale(1.05) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #2dd4bf;
    animation: confettiFall linear infinite;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Enhanced Result Display */
.result-card {
    animation: resultCardEntrance 0.6s ease-out 0.5s both;
}

@keyframes resultCardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Progress Bar Animation */
.progress-fill {
    transition: width 0.5s ease-out;
}

.progress-fill.animate {
    animation: progressGlow 2s ease-in-out infinite alternate;
}

@keyframes progressGlow {
    0% {
        box-shadow: 0 0 5px rgba(45, 212, 191, 0.5);
    }
    100% {
        box-shadow: 0 0 20px rgba(45, 212, 191, 0.8);
    }
}

/* Recommended Articles Styles */
.recommended-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.recommended-articles h3 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.recommended-article {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.recommended-article:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.article-category {
    background: var(--light-teal);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.read-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.article-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.article-link:hover {
    color: var(--secondary-color);
}
