.sentiment-hub {
    background: radial-gradient(1200px 600px at 12% 0%, rgba(255,165,0,0.18), transparent 55%),
                radial-gradient(900px 520px at 85% 12%, rgba(0, 200, 255, 0.14), transparent 55%),
                radial-gradient(900px 520px at 55% 90%, rgba(212,175,55,0.12), transparent 60%),
                #070707;
    color: #d7d8dc;
    min-height: 100vh;
    padding: 20px 0 80px;
    width: 100%;
    box-sizing: border-box;
}

.sentiment-hub * {
    box-sizing: border-box;
}

.sentiment-hub a {
    color: inherit;
}

.sentiment-container {
    width: min(92vw, 1200px);
    margin: 0 auto 60px;
    padding: 0 20px;
}

.sentiment-hero {
    text-align: center;
    margin-bottom: 24px;
}

.sentiment-hero h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
    color: #d4af37;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.sentiment-hero p {
    color: #b8bcc4;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 960px;
}

.sentiment-card {
    background: rgba(10,10,10,0.62);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.sentiment-card h2,
.sentiment-card h3 {
    color: #d4af37;
    letter-spacing: -0.01em;
}

.sentiment-hub .sentiment-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sentiment-hub .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.sentiment-hub .form-field {
    display: flex;
    flex-direction: column;
}

.sentiment-hub .form-field.full-width {
    grid-column: 1 / -1;
}

.sentiment-hub .form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #cfd2d8;
}

.sentiment-hub .form-field input,
.sentiment-hub .form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    font-size: 1em;
    background: rgba(255,255,255,0.04);
    color: #e7e9ed;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sentiment-hub .form-field textarea {
    min-height: 220px;
    resize: vertical;
}

.sentiment-hub .form-field input:focus,
.sentiment-hub .form-field textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212,175,55,0.18);
}

.sentiment-hub .form-action {
    display: flex;
    justify-content: flex-end;
}

.sentiment-hub .btn-primary {
    background: #000;
    color: #d4af37;
    padding: 12px 18px;
    border: 1px solid #d4af37;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.sentiment-hub .btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.sentiment-hub .form-hint {
    color: #9aa0a8;
    font-size: 0.95em;
    margin: 0;
}

.sentiment-hub .hidden {
    display: none;
}

.sentiment-hub .loading {
    text-align: center;
}

.sentiment-hub .loading p {
    margin-bottom: 14px;
    color: #cfd2d8;
}

.sentiment-hub .spinner {
    border: 3px solid rgba(255,255,255,0.15);
    border-top: 3px solid #d4af37;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    animation: spin 1.6s linear infinite;
    margin: 20px auto;
}

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

.sentiment-hub .error-message {
    background: rgba(255, 120, 120, 0.12);
    color: #ffb4b4;
    padding: 12px 14px;
    border-radius: 12px;
    margin: 12px 0;
    border: 1px solid rgba(255, 120, 120, 0.4);
}

.sentiment-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sentiment-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 14px;
}

#sentiment-summary,
#sentiment-chart {
    background: rgba(6,8,12,0.75);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px;
}

.sentiment-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 1.05em;
}

.sentiment-score .label {
    font-weight: 700;
    color: #d7d8dc;
}

.sentiment-score .value {
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: capitalize;
    border: 1px solid transparent;
}

.sentiment-score .value.positive {
    background: rgba(90, 220, 160, 0.16);
    color: #71f1b6;
    border-color: rgba(90, 220, 160, 0.35);
}

.sentiment-score .value.negative {
    background: rgba(255, 120, 140, 0.16);
    color: #ff9aa7;
    border-color: rgba(255, 120, 140, 0.35);
}

.sentiment-score .value.neutral {
    background: rgba(158, 234, 255, 0.12);
    color: #9eeaff;
    border-color: rgba(158, 234, 255, 0.35);
}

.sentiment-score .score {
    color: #9aa0a8;
    font-weight: 600;
}

.emotion-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emotion-bar {
    display: grid;
    grid-template-columns: minmax(80px, 140px) 1fr;
    gap: 12px;
    align-items: center;
}

.emotion-label {
    font-weight: 600;
    color: #cfd2d8;
    text-transform: capitalize;
}

.bar-container {
    position: relative;
    height: 26px;
    background: rgba(255,255,255,0.05);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(212,175,55,0.9), rgba(100, 223, 255, 0.9));
    border-radius: 14px;
    transition: width 0.3s ease;
}

.bar-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    font-weight: 700;
    color: #0b0f14;
    background: rgba(212,175,55,0.9);
    padding: 2px 6px;
    border-radius: 10px;
}

.sentiment-details {
    margin-top: 10px;
}

#sentiment-table-container {
    max-height: 420px;
    overflow: auto;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(6,8,12,0.82);
}

#sentimentTable {
    width: 100%;
    border-collapse: collapse;
}

#sentimentTable thead th {
    text-align: left;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 10px 12px;
    color: #9eeaff;
    background: rgba(5,5,5,0.9);
    position: sticky;
    top: 0;
    z-index: 1;
}

#sentimentTable tbody tr {
    background: linear-gradient(90deg, rgba(14,18,28,0.86), rgba(10,14,22,0.92));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#sentimentTable tbody tr:nth-child(even) {
    background: linear-gradient(90deg, rgba(18,24,36,0.88), rgba(12,16,26,0.94));
}

#sentimentTable tbody tr:hover {
    background: linear-gradient(90deg, rgba(22,30,45,0.92), rgba(16,22,34,0.96));
}

#sentimentTable tbody td {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 10px 12px;
    color: #e2e6ef;
}

#sentimentTable tbody td.positive {
    color: #71f1b6;
    font-weight: 600;
}

#sentimentTable tbody td.negative {
    color: #ff9aa7;
    font-weight: 600;
}

#sentimentTable tbody td.neutral {
    color: #cfd2d8;
    font-weight: 600;
}

@media (min-width: 720px) {
    .sentiment-hub .btn-primary {
        width: auto;
        min-width: 220px;
    }
}

@media (max-width: 900px) {
    .sentiment-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .sentiment-hub .form-row {
        grid-template-columns: 1fr;
    }

}
