/* Don't override global body styles - inherit from styles.css */

.pg-scope .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pg-scope .glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: var(--shadow-glass);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pg-scope .glass.tool-header{
background: var(--gradient-primary);
}

[data-theme="dark"] .pg-scope .glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pg-scope .glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.pg-scope .tool-header {
    text-align: center;
    padding: 3rem 2rem 2rem;
    color: var(--text-primary);
    background: var(--bg-container);
    position: relative;
}

/* All theme-toggle styles removed to prevent overlap with navigation header */

.pg-scope .title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.pg-scope .subtitle {
    font-size: 1.2rem;
    opacity: 0.7;
    font-weight: 300;
    color: white;
}

.pg-scope .explanation-box {
    background: var(--bg-container);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
}

.pg-scope .explanation-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
}

.pg-scope .main-content {
    background: var(--bg-container);
    padding: 2rem;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pg-scope .input-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pg-scope .text-input {
    width: 100%;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    resize: none;
    transition: all 0.3s ease;
}

.pg-scope .text-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1);
    transform: translateY(-2px);
}

.pg-scope .text-input::placeholder {
    color: var(--text-muted);
}

.pg-scope .controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pg-scope .control-btn {
    padding: 1rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: center;
}

.pg-scope .control-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-medium);
}

.pg-scope .control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pg-scope .control-btn.primary {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pg-scope .control-btn.primary:hover:not(:disabled) {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.pg-scope .tokens-section {
    margin-top: 2rem;
}

.pg-scope .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pg-scope .tokens-container {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    min-height: 80px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: flex-start;
}

.pg-scope .token-card {
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: scale(0);
    animation: tokenAppear 0.5s ease-out forwards;
}

@keyframes tokenAppear {
    to {
        transform: scale(1);
    }
}

.pg-scope .token-card:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-medium);
}

.pg-scope .token-card.highlighted {
    box-shadow: 0 0 0 3px var(--accent-primary);
    transform: scale(1.1);
}

.pg-scope .embeddings-section {
    margin-top: 2rem;
}

.pg-scope .view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pg-scope .view-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pg-scope .view-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.pg-scope .embeddings-container {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    max-height: 500px;
    overflow-y: auto;
}

.pg-scope .embedding-row {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-subtle);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    opacity: 0;
    animation: embeddingAppear 0.5s ease-out forwards;
}

@keyframes embeddingAppear {
    to {
        opacity: 1;
    }
}

.pg-scope .embedding-row.highlighted {
    background: rgba(124, 92, 255, 0.1);
    border-color: var(--accent-primary);
    transform: scale(1.02);
}

.pg-scope .embedding-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.pg-scope .token-label {
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.pg-scope .vector-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.pg-scope .vector-value {
    padding: 0.3rem 0.6rem;
    background: var(--bg-container);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-weight: 500;
}

.pg-scope .vector-value:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.pg-scope .heatmap-row {
    display: flex;
    gap: 2px;
    margin-bottom: 0.5rem;
}

.pg-scope .heatmap-cell {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color);
}

.pg-scope .heatmap-cell:hover {
    transform: scale(1.2);
    z-index: 10;
    box-shadow: var(--shadow-medium);
}

.pg-scope .projection-section {
    margin-top: 2rem;
}

.pg-scope .projection-container {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    height: 300px;
    position: relative;
    overflow: hidden;
}

.pg-scope .projection-canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.pg-scope .projection-point {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.pg-scope .projection-point:hover {
    transform: scale(1.5);
    box-shadow: var(--shadow-medium);
}

.pg-scope .empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-style: italic;
}

.pg-scope .tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 1000;
    transform: translateY(-100%);
    margin-top: -8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 200px;
    text-align: center;
}

.pg-scope .floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.pg-scope .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(124, 92, 255, 0.3);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10px) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .pg-scope .container {
        padding: 1rem;
    }

    .pg-scope .controls {
        flex-direction: column;
    }

    .pg-scope .control-btn {
        min-width: auto;
        width: 100%;
    }

    .pg-scope .tool-header {
        padding: 4rem 2rem 2rem;
    }

    /* Removed responsive theme-toggle styles to prevent overlap */

    .pg-scope .vector-values {
        justify-content: center;
    }

    .pg-scope .heatmap-row {
        justify-content: center;
    }
}

/* Educational Section Styles */
.pg-scope .embedding-explanation {
    background: var(--bg-container);
    padding: 2rem;
    border-radius: 24px;
}

.pg-scope .embedding-explanation .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pg-scope .concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pg-scope .concept-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.pg-scope .concept-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.pg-scope .concept-card[data-concept="vectors"]:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
}

.pg-scope .concept-card[data-concept="similarity"]:hover {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.05);
}

.pg-scope .concept-card[data-concept="dimensions"]:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.pg-scope .concept-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pg-scope .concept-icon {
    font-size: 1.5rem;
}

.pg-scope .concept-header h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.pg-scope .concept-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.pg-scope .concept-visual {
    margin: 0.8rem 0;
    padding: 0.5rem 0.75rem;
    background: var(--bg-subtle);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-left: 3px solid var(--accent-primary);
}

.pg-scope .concept-card[data-concept="vectors"] .concept-visual {
    border-left-color: #8b5cf6;
}

.pg-scope .concept-card[data-concept="similarity"] .concept-visual {
    border-left-color: #06b6d4;
}

.pg-scope .concept-card[data-concept="dimensions"] .concept-visual {
    border-left-color: #f59e0b;
}

.pg-scope .concept-example {
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.pg-scope .embedding-insights {
    background: var(--bg-subtle);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.pg-scope .embedding-insights h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.pg-scope .insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.pg-scope .insight-item {
    background: var(--bg-container);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pg-scope .insight-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.pg-scope .insight-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #8b5cf6, #06b6d4, #f59e0b, #ef4444);
    transition: width 0.3s ease;
}

.pg-scope .insight-item:hover::before {
    width: 6px;
}

.pg-scope .insight-item strong {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.pg-scope .insight-item {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
    padding-left: 1.5rem;
}