/* Global */
body {
    background: rgb(69,252,187);
    background: linear-gradient(90deg, rgba(69,252,187,1) 0%, rgba(62,253,29,1) 50%, rgba(69,252,187,1) 100%);
    height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    color: #fff;
}

body {
    background: linear-gradient(
        135deg,
        var(--secondary-color) 0%,
        var(--primary-color) 50%,
        var(--secondary-color) 100%
    );
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    box-sizing: border-box;
}

/* Opcional: adicionar um efeito de movimento suave ao gradiente */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
}

.loading {
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay label {
    color: white;
    font-size: 1.2em;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1rem 2rem;
    border-radius: 8px;
}

.centralize {
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.clear {
    background: transparent;
    color: #2dd36f;
    border: 2px solid #2dd36f;
}

.solid {
    background: #2dd36f;
    border: none;
    color: white;
}

.solid-two {
    background: #ffffff;
    border: none;
    color:#2dd36f;
}

.outline {
    background: transparent;
    color: #2dd36f;
    border: 2px solid #2dd36f;
    transition: background 0.2s, color 0.2s;
}

.error-message {
    color: red;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

button:active {
    opacity: 0.8;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: #ccc;
    color: #666;
    border-color: #aaa;
}

:root {
    /* Cores principais */
    --primary-color: #2dd36f;
    --primary-hover: #1eaa58;
    --secondary-color: #45fcbb;
    
    /* Cores de estado */
    --error-color: #ff4444;
    --success-color: #28a745;
    --disabled-color: #cccccc;
    
    /* Cores de texto */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #ffffff;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
    
    /* Bordas */
    --border-radius-sm: 5px;
    --border-radius-md: 10px;
    
    /* Espaçamentos */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    
    /* Transições */
    --transition-speed: 0.3s;
}

/* Media Queries mais abrangentes */
@media (max-width: 768px) {
    form {
        max-width: 90%;
        margin: 20px;
    }
    
    input, button {
        font-size: 14px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }
    
    form {
        padding: var(--spacing-sm);
    }
    
    .form-group {
        margin-bottom: var(--spacing-sm);
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

form {
    animation: fadeIn 0.5s ease-out;
}

.error-message {
    animation: fadeIn 0.3s ease-out;
}

/* Melhorar transições */
input, button {
    transition: all var(--transition-speed) ease;
}

button {
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

button:active::after {
    width: 200px;
    height: 200px;
}

button.fab {
    width: 54px;
    height: 54px;
    border-radius: 50px;
    border: none;
    font-size: 24px;
    box-shadow: 2px 2px 2px gray;
}

button.fab.fixed {
    position: fixed;
}

button.fab.bottom {
    bottom: 32px;
}

button.fab.right {
    right: 32px;
}

/* Foco e estados */
input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 211, 111, 0.2);
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 211, 111, 0.2);
}

header {
    text-align: right;
}

header button {
    width: auto;
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #006600;
        --primary-hover: #004d00;
    }
}

input,
button,
select {
    padding: 10px;
    width: -webkit-fill-avaliable;
}

/* Feedback visual */
.input-wrapper {
    position: relative;
}

.input-wrapper .icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.success .icon {
    color: var(--success-color);
}

.error .icon {
    color: var(--error-color);
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    background: var(--text-primary);
    color: var(--text-light);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.toast.error {
    background: var(--error-color);
}

.toast.success {
    background: var(--success-color);
}

.quit-button {
    background: transparent;
    color: rgb(255, 255, 255);
    border: none;
    cursor: pointer;
}
