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

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.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;
}

[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 .glass.tool-header{
background: var(--gradient-primary);
}

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

.pg-scope .toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--bg-subtle);
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pg-scope .toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: var(--accent-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .pg-scope .toggle-slider::before {
    transform: translateX(24px);
}

.pg-scope .theme-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.pg-scope .theme-icon.active {
    color: var(--accent-primary);
    transform: scale(1.1);
}

.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: 200px;
    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: 2rem;
    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 .tokens-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 200px;
    border: 1px solid var(--border-color);
}

.pg-scope .token {
    display: inline-block;
    margin: 3px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pg-scope .token::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.pg-scope .token:hover::before {
    left: 100%;
}

.pg-scope .token:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

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

.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;
}

.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 .cost-breakdown {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.pg-scope .cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pg-scope .cost-item.total {
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
    padding-top: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

@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 .theme-toggle {
        top: 1rem;
        right: 1rem;
        min-width: 80px;
        padding: 0.4rem;
    }

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

    .pg-scope .theme-icon {
        width: 16px;
        height: 16px;
    }

    .pg-scope .toggle-slider {
        width: 40px;
        height: 22px;
    }

    .pg-scope .toggle-slider::before {
        width: 18px;
        height: 18px;
    }

    [data-theme="dark"] .pg-scope .toggle-slider::before {
        transform: translateX(18px);
    }
}

.pg-scope .token-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;
}

.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;
    }
}

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

.pg-scope .tokenization-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-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-example {
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

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

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

.pg-scope .tokenization-tips ul {
    color: var(--text-secondary);
    padding-left: 1.5rem;
}

.pg-scope .tokenization-tips li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.pg-scope .tokenization-tips strong {
    color: var(--text-primary);
}
.pg-scope .cost-note { font-size: .78rem; color: var(--text-muted); margin: 0 0 .6rem; }
