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

body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #e0e0e0;
}

.container {
    width: 100%;
    max-width: 960px; /* ← Zwiększona szerokość */
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2.75rem 3rem; /* trochę więcej paddingu bocznego */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.header .emoji {
    font-size: 3.2rem;
    display: block;
    margin-bottom: 0.8rem;
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.5));
}

h1 {
    font-size: 1.85rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, #6dd5fa, #f9a8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.4rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.6rem;
}

textarea {
    width: 100%;
    height: 172px; /* ← Wyższe i szersze pole */
    font-size: 1rem;
    font-family: 'Inter', Arial, sans-serif;
    padding: 1.1rem 1.4rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #f0f0f0;
    resize: vertical;
    line-height: 1.65;
    transition: all 0.3s ease;
}

textarea::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
    background: rgba(0, 0, 0, 0.35);
}

button {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(124, 58, 237, 0.35);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.45);
}

.result {
    margin-top: 1.8rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.75rem;
    border-radius: 16px;
    animation: slideUp 0.4s ease;
}

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

.predicted-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.6rem 0 1.4rem 0;
}

.label-tag {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(109, 40, 217, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.4);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #c4b5fd;
}

.prob-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.prob-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.prob-name {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    min-width: 165px;
    font-weight: 500;
}

.prob-bar-bg {
    flex: 1;
    height: 9px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    overflow: hidden;
}

.prob-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    border-radius: 999px;
    transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.prob-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    width: 54px;
    text-align: right;
}

.divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 1.5rem 0;
}

.footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.18);
}

/* Rating */
.rating-panel {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.thumb-btn {
    padding: 4px 8px;
    max-width: 120px;
    display: inline-block;
    border-radius: 4px;
    background: none;
    border: 1px solid #ccc;
    cursor: pointer;
}

.thumb-btn:hover {
    transform: scale(1.2);
}

.thumb-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.thumb-btn.selected {
    border-color: #4caf50;
    background-color: #e8f5e9;
}

.rating-msg {
    font-size: 0.9rem;
    margin-left: 0.5rem;
    color: #a0f3a0;
}

/* model wyboru klasy ręcznie */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal.hidden { display: none; }

.modal-content {
    background: #1e1e2f;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    color: #e0e0e0;
}
.modal-content h3 { margin-top: 0; margin-bottom: 1rem; }
.checkboxes { max-height: 250px; overflow-y: auto; margin-bottom: 1rem; }
.checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 0.8rem; }
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #44475a;
    color: #e0e0e0;
}
.btn.primary { background: #7c3aed; }