/* 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;
}

/* Removed .theme-toggle to prevent overlap with navigation header */

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

/* All remaining theme styles removed */

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

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

.pg-scope .main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-container);
}

.pg-scope .input-panel, .pg-scope .output-panel {
    padding: 2rem;
}

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

.pg-scope .icon {
    width: 24px;
    height: 24px;
    opacity: 0.8;
    color: var(--text-secondary);
}

.pg-scope .input-area {
    position: relative;
    margin-bottom: 2rem;
}

.pg-scope .text-input {
    width: 100%;
    min-height: 250px;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    backdrop-filter: blur(10px);
    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 .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.pg-scope .stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.pg-scope .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pg-scope .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pg-scope .controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 2rem;
}

.pg-scope .model-select {
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.pg-scope .model-select:focus {
    outline: none;
    border-color: var(--border-focus);
}

.pg-scope .model-select option {
    background: var(--bg-container);
    color: var(--text-primary);
}

.pg-scope .clear-btn {
    padding: 0.8rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.pg-scope .clear-btn:hover {
    transform: translateY(-2px);
    background: var(--bg-subtle);
    box-shadow: var(--shadow-medium);
}

.pg-scope .chunks-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 300px;
    border: 1px solid var(--border-color);
    max-height: 600px;
    overflow-y: auto;
}

.pg-scope .chunk {
    background: var(--bg-container);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

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

.pg-scope .chunk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.pg-scope .chunk-title {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.pg-scope .chunk-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pg-scope .chunk-content {
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.pg-scope .overflow-warning {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-color: #ff6b6b;
}

.pg-scope .overflow-warning .chunk-title {
    color: white;
}

.pg-scope .overflow-warning .chunk-content {
    color: rgba(255, 255, 255, 0.9);
}

.pg-scope .overflow-warning .chunk-info {
    color: rgba(255, 255, 255, 0.7);
}

.pg-scope .chunk-legend {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
}

.pg-scope .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.pg-scope .legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid;
}

.pg-scope .legend-normal {
    background: var(--bg-container);
    border-color: var(--accent-primary);
}

.pg-scope .legend-overflow {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-color: #ff6b6b;
}

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

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

.pg-scope .comparison-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.pg-scope .comparison-model {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pg-scope .comparison-context {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.pg-scope .comparison-chunks {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.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(255, 255, 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 .main-content {
        grid-template-columns: 1fr;
    }

    .pg-scope .container {
        padding: 1rem;
    }

    .pg-scope .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    /* Removed all responsive theme styles to prevent overlap */

    .pg-scope .model-comparison {
        grid-template-columns: 1fr;
    }

    .pg-scope .chunk-legend {
        flex-direction: column;
        gap: 1rem;
    }
}

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

.pg-scope .chunking-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="context-window"]:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.pg-scope .concept-card[data-concept="chunking"]:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.pg-scope .concept-card[data-concept="overflow"]:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 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="context-window"] .concept-visual {
    border-left-color: #3b82f6;
}

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

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

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

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

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

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

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

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

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

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