/* Variáveis e Base Estética - Light Mode Premium e Minimalista */
:root {
    --bg-main: #ffffff;
    --card-bg: #ffffff;
    --card-border: rgba(27, 27, 27, 0.08);
    --text-main: #1b1b1b;
    --text-muted: #666666;
    --primary: #1b1b1b;
    --primary-hover: #333333;
    --accent: #c5b8ab;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* Anti-cópia padrão para todos os elementos */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Exceção: permitir selecionar o input e o link gerado */
input, textarea, #short-link {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Remover o glow anterior */
.glow-bg {
    display: none;
}

/* Header */
.header {
    width: 100%;
    padding: 24px 40px;
    display: flex;
    justify-content: flex-start;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.02em;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    flex-grow: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Responsivo fluido */
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-main);
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 48px;
}

/* Formulário e Inputs */
.shortener-box {
    width: 100%;
    max-width: 650px;
}

.form-container {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 9999px;
    padding: 8px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.form-container:focus-within {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.input-wrapper {
    display: flex;
    align-items: center;
    flex-grow: 1;
    padding-left: 20px;
}

.link-icon {
    color: var(--text-muted);
}

#url-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 16px;
    color: var(--text-main);
    font-size: 1.1rem;
}

#url-input::placeholder {
    color: var(--text-muted);
}

#submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 32px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#submit-btn:hover {
    background: var(--primary-hover);
}

/* Resultado */
.result-box {
    margin-top: 40px;
    width: 100%;
    max-width: 650px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    padding: 32px;
    border-radius: 24px;
    animation: fadeInSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.result-label {
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.link-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.04);
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 12px;
    border: 1px solid var(--card-border);
}

#short-link {
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s;
}

#short-link:hover {
    color: var(--primary-hover);
}

#copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--text-main);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

#copy-btn:hover { background: var(--primary-hover); }
#copy-btn:active { transform: scale(0.96); }

/* QR Code */
.qr-container {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.qr-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.qrcode {
    background: white;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid var(--card-border);
}

/* Botões do QR Code */
.qr-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.qr-actions button {
    background: var(--accent);
    color: var(--text-main);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qr-actions button:hover {
    background: #b5a89b;
    transform: translateY(-1px);
}
.qr-actions button:active { transform: translateY(0); }

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--success);
    color: white;
    padding: 14px 28px;
    border-radius: 9999px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 50;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Footer */
.footer {
    padding: 32px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--text-main);
}

/* Animações */
@keyframes fadeInSlideUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Responsividade Mobile First Premium */
@media (max-width: 640px) {
    .header { 
        padding: 20px; 
        justify-content: center;
    }
    
    .form-container {
        flex-direction: column;
        border-radius: 20px;
        padding: 16px;
        gap: 12px;
    }
    
    .input-wrapper {
        padding-left: 0;
        width: 100%;
    }
    
    #submit-btn {
        width: 100%;
        padding: 16px;
    }
    
    .link-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }
    
    #copy-btn { width: 100%; justify-content: center; }
}
