/* diagnostic.css */
.diagnostic-main {
    width: 800px;
    /* Fixed width for PC to prevent resizing */
    max-width: 95vw;
    margin: 4rem auto 6rem;
    padding: 0 1.5rem;
}

.diagnostic-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .diagnostic-card {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.diagnostic-intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.intro-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.diagnostic-intro h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), #22c55e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.diagnostic-intro p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.input-group {
    margin-bottom: 2.5rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.input-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.input-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-main);
    font-size: 1.1rem;
    transition: all 0.2s;
}

.input-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(16, 124, 65, 0.1);
}

.input-group input.input-error {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    50% {
        transform: translateX(8px);
    }

    75% {
        transform: translateX(-8px);
    }
}

.primary-btn.btn-lg {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Quiz Styles */
.quiz-header {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Timer Styles */
.timer-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(var(--primary-rgb), 0.05);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    font-weight: 700;
    color: var(--text-main);
}

.timer-container i {
    color: var(--primary-color);
}

.timer-progress-bg {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.timer-progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), #22c55e);
    transition: width 0.1s linear, background 0.3s ease;
}

.timer-danger .timer-progress-fill {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.timer-danger #timer-text {
    color: #ef4444;
    animation: timer-pulse 0.5s infinite alternate;
}

@keyframes timer-pulse {
    from {
        transform: scale(1);
        opacity: 1;
    }

    to {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.progress-container {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-number {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.question-container h2 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    line-height: 1.4;
    color: var(--text-main);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.diagnostic-card.god-mode-active {
    border: 2px solid #fbbf24;
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.2);
    transition: all 0.5s ease;
}

@keyframes god-glow {
    0% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.1);
    }

    50% {
        box-shadow: 0 0 60px rgba(251, 191, 36, 0.4);
    }

    100% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.1);
    }
}

.god-mode-active {
    animation: god-glow 2s infinite ease-in-out;
}

.god-badge {
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.5));
}

/* Debug Mode Hint */
.option-btn.debug-hint {
    background: rgba(var(--primary-rgb, 16, 185, 129), 0.08) !important;
    border-color: rgba(var(--primary-rgb, 16, 185, 129), 0.4) !important;
}

@media (max-width: 640px) {
    .options-grid {
        grid-template-columns: 100%;
    }
}

.option-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.option-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-card);
    transform: translateY(-2px);
}

.option-btn::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid var(--text-light);
    border-radius: 50%;
    flex-shrink: 0;
}

.option-btn:hover::before {
    border-color: var(--primary-color);
}

.primary-btn {
    border-radius: 16px;
    font-weight: 700;
    padding: 1.25rem 2rem;
    min-height: 3.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), #22c55e);
    color: white;
    border: none;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
    width: 100%;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    filter: brightness(1.1);
}

.secondary-btn {
    border-radius: 16px;
    font-weight: 600;
    padding: 1.25rem 2rem;
    min-height: 3.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* God Challenge Specific Buttons */
#accept-challenge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e293b;
    padding: 1rem 2rem;
    font-weight: 800;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

#decline-challenge {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
    padding: 1rem 2rem;
}

#decline-challenge:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border-color: var(--text-color);
}

/* Result Styles */
.result-header {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 2rem 0;
}

.user-display-name {
    color: var(--text-main);
    font-weight: 700;
}

.result-type-box {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(16, 124, 65, 0.05), rgba(34, 197, 94, 0.05));
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

[data-theme="dark"] .result-type-box {
    background: linear-gradient(135deg, rgba(16, 124, 65, 0.1), rgba(34, 197, 94, 0.1));
}

.type-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.type-id {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.type-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.feedback-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.feedback-grid-top {
    margin-top: -1rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 640px) {
    .feedback-grid {
        grid-template-columns: 100%;
    }
}

.feedback-item {
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.feedback-item.pos {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

[data-theme="dark"] .feedback-item.pos {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

.feedback-item.neg {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

[data-theme="dark"] .feedback-item.neg {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

.feedback-label {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pos .feedback-label {
    color: #166534;
}

.neg .feedback-label {
    color: #92400e;
}

[data-theme="dark"] .pos .feedback-label {
    color: #4ade80;
}

[data-theme="dark"] .neg .feedback-label {
    color: #fbbf24;
}

.feedback-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-main);
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    margin: 2rem 0;
}

.share-btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.x-btn {
    background: #000 !important;
    color: #fff !important;
    border: none !important;
}

.x-btn:hover {
    background: #222 !important;
    transform: translateY(-2px);
}

.score-badge {
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.score-badge span {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.hidden {
    display: none !important;
}

/* Axes Visualization */
.axes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.axis-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.axis-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.axis-bar-container {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    position: relative;
}

.axis-marker {
    position: absolute;
    top: -4px;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-left: -7px;
    border: 2px solid var(--bg-card);
    transition: left 1s ease-out;
}

/* God Rank Premium Effects */
.diagnostic-card.god-result-card {
    border: 3px solid #fbbf24;
    background: linear-gradient(135deg, var(--bg-card), rgba(251, 191, 36, 0.05));
    position: relative;
    overflow: hidden;
}

.god-effects-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.god-result-card .type-id {
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: god-shimmer 3s linear infinite;
    filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.3));
}

@keyframes god-shimmer {
    to {
        background-position: 200% center;
    }
}

.god-particle {
    position: absolute;
    background: #fbbf24;
    border-radius: 50%;
    opacity: 0.6;
    animation: float-up 4s infinite linear;
}

@keyframes float-up {
    0% {
        transform: translateY(100%) scale(0);
        opacity: 0;
    }

    20% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Weak Points Review Section */
.review-section {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px dashed var(--border-color);
}

.review-section h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

.review-section h3 i {
    color: #ef4444;
}

.review-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.missed-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.missed-item {
    background: var(--bg-secondary);
    border-left: 4px solid #ef4444;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.missed-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.missed-category {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #ef4444;
}

.missed-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.missed-id {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Ranking Registration styles */
.ranking-reg-area {
    width: 100%;
    text-align: center;
}

.ranking-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.ranking-status.success {
    color: var(--primary-color);
}

.ranking-status.error {
    color: #ef4444;
}

/* Evaluation Grid and Cards */
.evaluation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.eval-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s ease;
}

.eval-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.eval-card h4 {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
    text-transform: uppercase;
}

.eval-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
}

.summary-text {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    text-align: center;
}

/* Feedback Styling Fix */
.feedback-text {
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-line;
}
