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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.tab-navigation {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e2e8f0;
}

.tab-button {
    flex: 1;
    padding: 20px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: #fff;
    color: #667eea;
}

.tab-button.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.scanner-section, .chat-section {
    padding: 30px;
}

.url-input-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.url-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

#urlInput {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.1rem;
}

#urlInput:focus {
    outline: none;
    border-color: #667eea;
}

#scanBtn {
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

#scanBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

#scanBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.scan-info {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.8;
}

.scan-info strong {
    color: #333;
}

.free-badge {
    display: inline-block;
    background: #48bb78;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 8px;
}

/* Status Styles */
.status-container {
    display: none;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 1rem;
}

.status-container.active {
    display: block;
}

.status-scanning {
    background: #e6f7ff;
    border-left: 4px solid #1890ff;
    color: #0050b3;
}

.status-error {
    background: #fff1f0;
    border-left: 4px solid #f5222d;
    color: #a8071a;
}

.status-warning {
    background: #fffbe6;
    border-left: 4px solid #faad14;
    color: #ad6800;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #c53030;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.paste-html-section {
    background: #fff8e1;
    border: 2px dashed #ffa726;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: none;
}

.paste-html-section.active {
    display: block;
}

.paste-html-section h3 {
    color: #e65100;
    margin-bottom: 10px;
}

.paste-html-section textarea {
    width: 100%;
    height: 150px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    margin: 10px 0;
}

.paste-html-section button {
    background: #ff9800;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
}

.paste-html-section button:hover {
    background: #f57c00;
}

.paste-html-section button.cancel {
    background: #999;
}

/* Results Container */
.results-container {
    display: none;
}

.results-container.active {
    display: block;
}

.result-header {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.result-header h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.result-url {
    font-size: 1rem;
    opacity: 0.9;
    word-break: break-all;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    text-align: center;
}

.summary-card.critical {
    border-color: #f56565;
    background: #fff5f5;
}

.summary-card.high {
    border-color: #ed8936;
    background: #fffaf0;
}

.summary-card.medium {
    border-color: #ecc94b;
    background: #fffff0;
}

.summary-card.low {
    border-color: #48bb78;
    background: #f0fff4;
}

.summary-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.summary-card.critical .summary-number { color: #c53030; }
.summary-card.high .summary-number { color: #c05621; }
.summary-card.medium .summary-number { color: #975a16; }
.summary-card.low .summary-number { color: #22543d; }

.summary-label {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

/* Free Preview Banner */
.free-preview-banner {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.free-preview-banner h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.free-preview-banner p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Issue Card */
.issue-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s;
}

.issue-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.issue-card.critical { border-left: 5px solid #f56565; }
.issue-card.high { border-left: 5px solid #ed8936; }
.issue-card.medium { border-left: 5px solid #ecc94b; }
.issue-card.low { border-left: 5px solid #48bb78; }

.issue-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
    gap: 15px;
}

.issue-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
}

.severity-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.severity-badge.critical {
    background: #fed7d7;
    color: #c53030;
}

.severity-badge.high {
    background: #feebc8;
    color: #c05621;
}

.severity-badge.medium {
    background: #fefcbf;
    color: #975a16;
}

.severity-badge.low {
    background: #c6f6d5;
    color: #22543d;
}

.wcag-reference {
    background: #edf2f7;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #4a5568;
}

.wcag-reference strong {
    color: #2d3748;
}

.issue-description {
    color: #4a5568;
    margin-bottom: 15px;
    line-height: 1.8;
}

.remediation-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
}

.remediation-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.remediation-steps {
    margin-left: 20px;
    color: #4a5568;
}

.remediation-steps li {
    margin-bottom: 8px;
}

.code-example {
    background: #2d3748;
    color: #68d391;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Locked Content Overlay */
.locked-issues {
    position: relative;
    filter: blur(3px);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.unlock-overlay {
    background: rgba(255, 255, 255, 0.95);
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin: 30px 0;
}

.unlock-overlay h3 {
    color: #2d3748;
    font-size: 2rem;
    margin-bottom: 15px;
}

.unlock-overlay .price {
    font-size: 3.5rem;
    font-weight: bold;
    color: #667eea;
    margin: 20px 0;
}

.unlock-overlay .price .currency {
    font-size: 2rem;
    vertical-align: super;
}

.unlock-features {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.unlock-features ul {
    list-style: none;
    padding: 0;
}

.unlock-features li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.unlock-features li:last-child {
    border-bottom: none;
}

.unlock-features li::before {
    content: "✓";
    color: #48bb78;
    font-weight: bold;
    font-size: 1.3rem;
    margin-right: 12px;
}

/* Action Buttons */
.action-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.2rem;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.report-footer {
    background: #f7fafc;
    padding: 25px;
    text-align: center;
    margin-top: 40px;
    border-top: 2px solid #e2e8f0;
}

.report-footer p {
    color: #666;
    margin-bottom: 15px;
}

/* Chat Styles */
.chat-container {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    animation: fadeIn 0.3s ease-in;
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-content {
    max-width: 75%;
    padding: 15px 20px;
    border-radius: 18px;
    position: relative;
}

.message.bot .message-content {
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 10px;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.quick-actions {
    padding: 15px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.quick-action-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-action-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.input-wrapper {
    display: flex;
    gap: 10px;
}

#chatInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#chatInput:focus {
    outline: none;
    border-color: #667eea;
}

#sendBtn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#sendBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#sendBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.typing-indicator {
    display: none;
    padding: 15px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    border: 1px solid #e2e8f0;
}

.typing-indicator.active {
    display: block;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    margin: 0 2px;
    animation: bounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .tab-button {
        font-size: 1rem;
        padding: 15px 10px;
    }

    .url-input-wrapper, .input-wrapper {
        flex-direction: column;
    }

    #scanBtn, #sendBtn {
        width: 100%;
    }

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

    .unlock-overlay .price {
        font-size: 2.5rem;
    }

    .message-content {
        max-width: 85%;
    }

    .chat-container {
        height: 400px;
    }
}
