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

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: #f0f0f0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    padding: 40px 40px 20px;
    background: white;
    color: #333;
}

.header h1 {
    font-size: 32px;
    font-weight: 600;
}

.features-section {
    padding: 40px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
}

.features-grid {
    display: flex;
    gap: 16px;
    min-width: min-content;
}

.feature-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-family: inherit;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 220px;
    height: 220px;
    flex-shrink: 0;
}

.feature-card:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    transform: translateY(-4px);
}

.feature-card.active {
    background: #f0f4ff;
    border-color: #667eea;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.feature-icon {
    width: 70px;
    height: 70px;
    color: #667eea;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h2 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.feature-card p {
    font-size: 12px;
    color: #666;
    line-height: 1.4
    color: #666;
    line-height: 1.5;
}

.main-content {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 40px;
}

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

.input-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-controls label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.upload-icon-btn {
    margin-top: 0;
    padding: 8px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    font-size: 20px;
}

.upload-icon-btn:hover {
    background: #f5f5f5;
    border-color: #999;
    color: #333;
}

.upload-icon-btn:active {
    background: #ececec;
}

.upload-icon-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.upload-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.run-btn {
    padding: 8px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    color: #000;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.run-btn svg {
    width: 20px;
    height: 20px;
}

.run-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.run-btn:active {
    background: #ececec;
}

.run-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.run-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

#text-input {
    flex: 1;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    resize: none;
    color: #333;
    background: white;
    transition: border-color 0.2s ease;
}

#text-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#text-input::placeholder {
    color: #999;
}

.button-group {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
}

.details-panel {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    max-height: 500px;
}

.details-panel h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

#results-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.placeholder-text {
    color: #999;
    font-size: 13px;
    line-height: 1.6;
}

.result-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.result-item h3 {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.result-item p, .result-item ul {
    font-size: 13px;
    color: #333;
    line-height: 1.6;
}

.result-item ul {
    list-style: none;
    padding-left: 0;
}

.result-item li {
    padding: 4px 0;
}

.result-item li:before {
    content: "• ";
    color: #667eea;
    font-weight: bold;
    margin-right: 6px;
}

.sentiment-positive {
    border-left-color: #10b981;
}

.sentiment-positive h3 {
    color: #10b981;
}

.sentiment-negative {
    border-left-color: #ef4444;
}

.sentiment-negative h3 {
    color: #ef4444;
}

.sentiment-neutral {
    border-left-color: #f59e0b;
}

.sentiment-neutral h3 {
    color: #f59e0b;
}

.footer {
    padding: 20px 40px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

.primary-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-icon {
    width: 16px;
    height: 16px;
}

/* Loading state */
.loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .details-panel {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .container {
        border-radius: 0;
        min-height: 100vh;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .main-content {
        padding: 20px;
        gap: 12px;
    }

    .features-section {
        padding: 20px;
    }

    .footer {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .input-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .control-buttons {
        width: 100%;
    }

    .secondary-btn {
        flex: 1;
    }
}
