/* Configurações Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: #f8fafc;
    height: 100vh;
    overflow: hidden;
}

.navbar {
    margin-top: 3rem;
    width: 100%;
    display: flex;
    justify-content: end;
    align-items: center;
}

.navbar .nav-container{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .nav-container .btn-dashboard{
    margin-left: 20px;
    margin-right: 20px;
}

/* Botão Sair (Canto superior) */
.btn-dashboard {
    padding: 20px;
    top: 20px;
    left: 20px;
    right: 20px;
    background: rgba(81, 3, 236, 0.637);
    border: 1px solid rgba(238, 0, 255, 0.52);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-dashboard:hover {
    background: #d426c0;
    color: white;
}

.logout:hover{
    background-color: #ef4444 !important;
}

/* Container Principal */
.container{
    margin-top: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 2rem;
    color: #38bdf8;
    margin-bottom: 8px;
}

.subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

/* Grupo de Input */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

button {
    background: #38bdf8;
    color: #0f172a;
    font-weight: bold;
    border: none;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

button:hover {
    background: #0ea5e9;
    transform: translateY(-2px);
}

button:disabled {
    background: #475569;
    cursor: not-allowed;
    transform: none;
}

/* Resultado */
#resultado-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none; 
}

.url-box {
    background: rgba(56, 189, 248, 0.1);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.url-text {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-copy {
    background: #38bdf8;
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* Modal de Bloqueio (Acesso Restrito) */
#modal-bloqueio {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    display: none; /* Mostre via JS se o token for null */
}

.modal-content {
    background: #1e293b;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid #ef4444;
}

.modal-content h2 { color: #ef4444; margin-bottom: 10px; }
.modal-content p { margin-bottom: 20px; color: #94a3b8; }

#lista-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 900px;
    margin: 20px auto;
}

/* O Card Retangular */
.link-card-horizontal {
    background: #1e293b; /* Fundo escuro azulado */
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Espalha o conteúdo */
    transition: transform 0.2s, border-color 0.2s;
}

.link-card-horizontal:hover {
    border-color: #38bdf8;
    transform: translateX(5px); /* Efeito suave de deslizar ao passar o mouse */
}

/* Conteúdo (Links) */
.link-content {
    flex: 1; /* Ocupa o máximo de espaço possível */
    min-width: 0; /* Permite que o texto quebre ou use ellipsis */
    margin-right: 20px;
}

.url-original-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.url-original-text {
    margin: 2px 0 5px 0;
    color: #f8fafc;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Corta links gigantes com ... */
}

.url-curta-link {
    color: #38bdf8;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
}

/* Cliques */
.clicks-badge {
    background: #0f172a;
    padding: 6px 12px;
    border-radius: 20px;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-right: 20px;
    border: 1px solid #334155;
}

/* Botões */
.link-actions {
    display: flex;
    gap: 10px;
}

.btn-copy, .btn-del {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    border: none;
    transition: filter 0.2s;
}

.btn-copy { background: #38bdf8; color: #0f172a; }
.btn-del { background: #ef4444; color: white; }

.btn-copy:hover, .btn-del:hover { filter: brightness(1.1); }