/* Bloquear o fundo branco do Brave/Chrome/Edge */
.input-field {
    appearance: none;
    -webkit-appearance: none;
}

/* Fix específico para quando o browser preenche os dados (Autofill) */
.input-field:-webkit-autofill,
.input-field:-webkit-autofill:hover, 
.input-field:-webkit-autofill:focus {
    -webkit-text-fill-color: #e2e8f0; /* Cor do texto */
    -webkit-box-shadow: 0 0 0px 1000px #020617 inset; /* Cor do fundo (idêntica ao teu bg) */
    transition: background-color 5000s ease-in-out 0s;
}

/* Garante que o fundo não muda no Brave */
.input-field {
    background-color: #020617 !important; /* Força a cor sólida caso o rgba falhe */
    background-image: none !important;
}

.glass-card {
    background: rgb(15, 23, 42); /* fallback sólido */
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.hash-badge {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.15);
    border: 0.5px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: #60a5fa;
}

.success-bar {
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.success-bar.show {
    transform: scaleX(1);
}

.user-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.review-username {
    font-weight: 600;
    color: #60a5fa;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 0.5rem;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.12);
    border: 0.5px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: #60a5fa;
    flex-shrink: 0;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.field-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.input-field {
    background: rgba(2, 6, 23, 0.6);
    border: 0.5px solid rgba(51, 65, 85, 0.8);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: #e2e8f0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-field:focus {
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(2, 6, 23, 0.9);
}

.input-field::placeholder {
    color: #475569;
}

.optional-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #334155;
    letter-spacing: 0.05em;
    pointer-events: none;
    transition: opacity 0.2s;
}

.char-counter {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 10px;
    color: #334155;
    letter-spacing: 0.05em;
    pointer-events: none;
    transition: color 0.2s;
}

.char-counter.warn { color: #f59e0b; }
.char-counter.over { color: #ef4444; }

.form-hint {
    font-size: 11px;
    color: #334155;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

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

.review-animate {
    animation: fadeIn 0.4s ease-out forwards;
}


.review-card p {
    /* Garante que o parágrafo do comentário não empurra a borda */
    white-space: pre-wrap; 
    word-break: break-word;
}


.review-date {
    font-size: 0.65rem;
    color: #334155;
    margin-top: auto; /* Empurra a data para o fundo do card */
    padding-top: 1rem;
    display: block;
    font-family: monospace;
}

/* Container Masonry */
.reviews-masonry {
    column-count: 1;
    column-gap: 2rem; /* Aumentei o espaço entre tiles para dar ar mais premium */
    width: 100%;
}

/* Tablets (min-width: 768px) */
@media (min-width: 768px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr); /* Grelha de 2 colunas apenas */
    }
}

/* Monitores Grandes: Mantemos 2 colunas largas ou 3 se o ecrã for gigante */
@media (min-width: 1280px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Classe para comentários longos (> 500 chars) */
@media (min-width: 768px) {
    .review-card.wide-card {
        grid-column: span 2; /* Ocupa as 2 colunas (100% da largura) */
    }
}

/* Tile Individual */
.review-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 5px solid #3b82f6;
    border-radius: 20px;
    padding: 2.5rem;
    word-break: break-word;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.review-card:hover {
    transform: translateY(-5px);
}

/* Texto da Review */
.review-text {
    font-size: 1.1rem; /* Texto ligeiramente maior para acompanhar a tile larga */
    line-height: 1.7;
    color: #e2e8f0;
    word-break: break-word;
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 coluna em telemóvel */
    gap: 2rem;
    grid-auto-flow: dense; /* Organiza os pequenos nos buracos dos grandes */
    width: 100%;
}