/* Tool-specific styles only - base styles are in tool-layout.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.text-area {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    min-height: 200px;
    transition: border-color 150ms ease;
}

.text-area:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.text-area::placeholder {
    color: #6b7280;
}

.button-row {
    display: flex;
    gap: 12px;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-unlock {
    color: #0a0a0a;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: opacity 150ms ease;
}

.button-unlock:hover {
    opacity: 0.9;
}

.modal-hidden {
    display: none;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.output-header h3 {
    font-size: 22px;
    font-weight: 600;
    line-height: 28px;
    color: #d1d5db;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.stat-card {
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    padding: 20px 16px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    transition: border-color 150ms ease;
}

.stat-card:hover {
    border-color: #374151;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.stat-unit {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
}

.pro-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid #374151;
}

.pro-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
}

.pro-feature-block {
    position: relative;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden;
}

.pro-feature-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pro-feature-label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.reading-level-display {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}

.reading-level-score {
    font-size: 36px;
    font-weight: 700;
    color: #646cff;
    line-height: 1;
}

.reading-level-label {
    font-size: 15px;
    font-weight: 400;
    color: #9ca3af;
}

.reading-level-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid #2a2a2a;
}

.detail-label {
    font-size: 13px;
    color: #9ca3af;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

.vocab-diversity-display {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vocab-score {
    font-size: 36px;
    font-weight: 700;
    color: #646cff;
    line-height: 1;
}

.vocab-indicator {
    flex: 1;
    height: 8px;
    background-color: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.vocab-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 300ms ease, background-color 300ms ease;
}

.vocab-indicator.low::after {
    background-color: #ef4444;
}

.vocab-indicator.medium::after {
    background-color: #eab308;
}

.vocab-indicator.high::after {
    background-color: #10b981;
}

.chart-container {
    width: 100%;
}

.chart-container canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.export-actions {
    display: flex;
    gap: 12px;
}

.pro-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 8px;
    z-index: 10;
}

.pro-lock-overlay.unlocked {
    display: none;
}

.lock-icon {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 2px;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .output-section {
        padding: 16px;
    }

    .stats-grid {
        gap: 8px;
    }

    .stat-card {
        padding: 16px 12px;
    }

    .stat-value {
        font-size: 24px;
    }

    .pro-feature-block {
        padding: 16px;
    }

    .reading-level-score,
    .vocab-score {
        font-size: 28px;
    }

    .export-actions {
        flex-direction: column;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .button-row {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex: 1 1 100%;
    }

    .reading-level-display {
        flex-direction: column;
        gap: 4px;
    }

    .vocab-diversity-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .vocab-indicator {
        width: 100%;
    }
}