/**
 * Design System: Neo-Brutalist Soft
 * DFII Score: 10 (Strong)
 * Anchor: Typography-led, high contrast, tactile interactions
 */

:root {
    /* Palheta */
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --code-bg: #f8fafc;
    --border-color: #e2e8f0;
    
    /* Space */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    
    /* Tipografia */
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-logo: 'Righteous', cursive;
    
    /* Efeitos */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-md: 12px;
    --radius-lg: 24px;
}

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

body {
    background-color: var(--bg-color);
    font-family: var(--font-display);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Prevenção de Scroll */
}

/* Background */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
    z-index: -1;
}

.app-container {
    width: 100%;
    max-width: 480px;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.logo-text {
    font-family: var(--font-logo);
    font-size: 3.5rem;
    line-height: 1;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1e293b 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.05);
    margin: 0;
    position: relative;
    z-index: 2;
}

.logo-text span {
    font-weight: 400;
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
}

.logo-bar {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #1e293b, #3b82f6);
    border-radius: 2px;
    margin-top: -5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.5;
    font-weight: 500;
}

.display-container {
    background: var(--code-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
}

.display-container:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.code-text {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    width: 100%;
    text-align: center;
}

.icon-button {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.icon-button:hover {
    background: var(--bg-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.icon-button:active {
    transform: translateY(0);
}


.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    text-decoration: none;
    display: inline-block;
    width: 100%;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
    color: white;
}

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

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: shine 6s infinite;
}

.app-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: -2rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
}

.footer-logo {
    height: 100px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    opacity: 0.95;
}


.nav-header {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--accent-color);
}


.about-card {
    text-align: left;
    gap: 1.5rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.profile-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}


.avatar-img {
    width: 130px;
    height: 140px;
    border-radius: 80%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    background-color: #e0e7ff;
}

.about-section h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.about-section p {
    line-height: 1.6;
    color: var(--text-primary);
}

.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-outline:hover {
    border-color: var(--accent-color);
    background: white;
    color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.confirm-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 999;
}

.confirm-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.confirm-modal__dialog {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 1.5rem;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.confirm-modal.active .confirm-modal__dialog {
    transform: scale(1);
}

.confirm-modal__title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.confirm-modal__message {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.confirm-modal__actions {
    display: flex;
    gap: 0.75rem;
}

.confirm-modal__actions .btn-primary,
.confirm-modal__actions .btn-outline {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
}

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

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

@keyframes pop {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.animate-pop {
    animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.flash-success {
    animation: flash 0.8s ease;
}

@keyframes flash {
    0% { background-color: var(--code-bg); border-color: var(--border-color); }
    20% { background-color: #dcfce7; border-color: #22c55e; }
    100% { background-color: var(--code-bg); border-color: var(--border-color); }
}


@media (max-width: 480px) {
    .card {
        padding: 2rem 1.5rem;
    }
    
    .code-text {
        font-size: 1.4rem;
        letter-spacing: 0.05em;
    }
    
    .logo-text {
        font-size: 2.8rem;
    }

    .action-buttons {
        flex-direction: column;
    }
}
