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

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 50%, #cd853f 100%);
    min-height: 100vh;
    color: #2c3e50;
}

.container {
    width: 100%;
    min-height: 100vh;
    padding-top: 80px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #f5f5dc 0%, #fff8e1 100%);
    border-bottom: 3px solid #8b4513;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    padding: 15px 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

header h1 {
    margin: 0;
    font-size: 2.2em;
    color: #8b4513;
    text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.2);
    font-weight: bold;
    white-space: nowrap;
    flex: 1;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 900px) {
  header h1 {
    font-size: 1.4em;
  }
}
@media (max-width: 600px) {
  header h1 {
    font-size: 1.7em;
    padding: 0 2px;
  }
}
@media (max-width: 400px) {
  header h1 {
    font-size: 1.3em;
  }
}

nav {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
    flex-shrink: 0;
    margin-left: 20px;
}

.nav-btn {
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Georgia', serif;
    font-size: 0.8em;
    border: 3px solid #5d2e0d;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
    transition: all 0.3s;
    margin: 0 6px;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
    cursor: pointer;
    height: 36px;
    box-sizing: border-box;
    min-width: 120px;
    text-align: center;
}

.nav-btn:hover,
.nav-btn.active {
    background: linear-gradient(135deg, #a0522d, #cd853f);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
}

main {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.cadastro-form {
    background: linear-gradient(135deg, #f5f5dc 0%, #fff8e1 100%);
    border: 3px solid #8b4513;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.cadastro-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #8b4513, #a0522d, #cd853f);
}

.cadastro-form h2 {
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 2em;
    color: #8b4513;
    text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.2);
    font-weight: bold;
}

.form-description {
    text-align: center;
    color: #5d2e0d;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0 0 30px 0;
    font-style: italic;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #8b4513;
    font-size: 1.1em;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #d2691e;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Georgia', serif;
    background: #fff8e1;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b4513;
    box-shadow: 0 0 15px rgba(139, 69, 19, 0.3);
    background: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    font-size: 12px;
    color: #5d2e0d;
    margin-top: 8px;
}

.char-counter.warning {
    color: #f39c12;
}

.char-counter.danger {
    color: #e74c3c;
}

.info {
    font-size: 12px;
    color: #5d2e0d;
    margin: 8px 0;
    font-style: italic;
}

.fotos-preview {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.foto-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border: 3px solid #8b4513;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(139, 69, 19, 0.2);
}

.foto-preview .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: 2px solid #8b4513;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.foto-preview .remove-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.sprites-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.sprite-option {
    border: 3px solid #8b4513;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, #fff8e1, #f5f5dc);
    box-shadow: 0 4px 10px rgba(139, 69, 19, 0.2);
    transition: all 0.3s ease;
}

.sprite-option:hover {
    background: linear-gradient(135deg, #f5f5dc, #fff8e1);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(139, 69, 19, 0.3);
}

.sprite-option.selected {
    border-color: #cd853f;
    box-shadow: 0 0 15px rgba(139, 69, 19, 0.4);
    background: linear-gradient(135deg, #cd853f, #daa520);
}

.sprite-option img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.sprite-option span {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #8b4513;
    font-weight: bold;
}

/* Estilos para sprite-card (usado pelo JavaScript) */
.sprite-card {
    border: 3px solid #8b4513;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, #fff8e1, #f5f5dc);
    box-shadow: 0 4px 10px rgba(139, 69, 19, 0.2);
    transition: all 0.3s ease;
    display: inline-block;
    margin: 5px;
    position: relative;
}

.sprite-card:hover {
    background: linear-gradient(135deg, #f5f5dc, #fff8e1);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(139, 69, 19, 0.3);
}

.sprite-card.selected {
    border-color: #cd853f;
    box-shadow: 0 0 15px rgba(139, 69, 19, 0.4);
    background: linear-gradient(135deg, #cd853f, #daa520);
}

.sprite-card input[type="radio"] {
    display: none;
}

.sprite-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.btn-cadastrar {
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: white;
    padding: 16px 36px;
    border-radius: 30px;
    border: 3px solid #5d2e0d;
    font-size: 1.15em;
    font-weight: bold;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
    letter-spacing: 0.5px;
    min-width: 240px;
    display: block;
    margin: 35px auto 0 auto;
    box-sizing: border-box;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn-cadastrar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-cadastrar:hover {
    background: linear-gradient(135deg, #a0522d, #cd853f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
    border-color: #8b4513;
}

.btn-cadastrar:hover::before {
    left: 100%;
}

.btn-cadastrar:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(139, 69, 19, 0.3);
}

.btn-cadastrar:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.3), 0 4px 15px rgba(139, 69, 19, 0.2);
}

/* Estilos para a página de visualização de animais */
.filtros {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.filtros select,
.filtros input {
    padding: 10px 15px;
    border: 2px solid #8b4513;
    border-radius: 8px;
    font-size: 14px;
    background: #fff8e1;
    color: #2c3e50;
    font-family: 'Georgia', serif;
}

.filtros select:focus,
.filtros input:focus {
    outline: none;
    border-color: #a0522d;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.3);
}

/* Estilos para estatísticas */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #f5f5dc 0%, #fff8e1 100%);
    border: 3px solid #8b4513;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(139, 69, 19, 0.3);
}

.stat-card h3 {
    color: #8b4513;
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: bold;
}

.stat-card span {
    color: #2c3e50;
    font-size: 2em;
    font-weight: bold;
    display: block;
}

.animais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.admin-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.animal-card {
    background: linear-gradient(135deg, #f5f5dc 0%, #fff8e1 100%);
    border: 3px solid #8b4513;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.animal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b4513, #a0522d, #cd853f);
}

.animal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(139, 69, 19, 0.3);
}

.animal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.animal-imagem {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #8b4513;
}

.animal-info h3 {
    color: #8b4513;
    font-size: 1.3em;
    margin-bottom: 5px;
    font-weight: bold;
}

.animal-info p {
    color: #5d2e0d;
    font-size: 0.9em;
    margin: 0;
}

.animal-detalhes p {
    margin: 8px 0;
    color: #2c3e50;
    font-size: 0.95em;
}

.animal-detalhes strong {
    color: #8b4513;
    font-weight: bold;
}

.status {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.status.pendente {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff8e1;
}

.status.aprovado {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff8e1;
}

.status.reprovado {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff8e1;
}

.sem-animais {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, #f5f5dc 0%, #fff8e1 100%);
    border: 3px solid #8b4513;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.2);
}

.sem-animais p {
    color: #5d2e0d;
    font-size: 1.2em;
    margin-bottom: 20px;
    font-style: italic;
}

/* User menu styles */
.user-menu-container {
    position: relative;
    margin-left: 15px;
    /* Garante que o menu do usuário fique sempre à direita */
    order: 99;
}

.user-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0px 16px;
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #5d2e0d;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
    height: 36px;
    box-sizing: border-box;
}

.user-icon:hover {
    background: linear-gradient(135deg, #a0522d, #cd853f);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.user-avatar {
    font-size: 18px;
}

.user-name {
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    color: white;
}

.user-dropdown {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #f5f5dc, #fff8e1);
    border: 3px solid #8b4513;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
    min-width: 200px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 5px;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding: 15px;
    border-bottom: 1px solid rgba(139, 69, 19, 0.2);
}

.user-email {
    color: #8b4513;
    font-size: 12px;
    font-weight: bold;
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #8b4513, transparent);
    margin: 5px 0;
}

.dropdown-item {
    display: block;
    padding: 12px 15px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    border-radius: 0;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: white;
    transform: translateX(5px);
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: none !important;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.show {
    display: flex !important;
}

/* Garantir que o modal esteja oculto por padrão */
#modalExclusao {
    display: none !important;
}

#modalExclusao.show {
    display: flex !important;
}

.modal-content {
    background: linear-gradient(135deg, #f5f5dc 0%, #fff8e1 100%);
    border: 3px solid #8b4513;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.4);
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #8b4513;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #e74c3c;
    transform: scale(1.1);
}

.modal-content h3 {
    color: #8b4513;
    font-size: 1.5em;
    margin-bottom: 20px;
    font-weight: bold;
}

.modal-content p {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.aviso {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1em;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.btn-excluir {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    border: 3px solid #c0392b;
    font-size: 0.8em;
    font-weight: bold;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
    letter-spacing: 0.5px;
    height: 36px;
    box-sizing: border-box;
}

.btn-cancelar {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    border: 3px solid #7f8c8d;
    font-size: 0.8em;
    font-weight: bold;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.2);
    letter-spacing: 0.5px;
    height: 36px;
    box-sizing: border-box;
}

.btn-aprovar {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    border: 3px solid #27ae60;
    font-size: 0.8em;
    font-weight: bold;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
    letter-spacing: 0.5px;
    height: 36px;
    box-sizing: border-box;
}

.btn-reprovar {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    border: 3px solid #e67e22;
    font-size: 0.8em;
    font-weight: bold;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.2);
    letter-spacing: 0.5px;
    height: 36px;
    box-sizing: border-box;
}

/* Estilos para cards de usuários */
.usuarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.usuario-card {
    background: linear-gradient(135deg, #f5f5dc 0%, #fff8e1 100%);
    border: 3px solid #8b4513;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.usuario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b4513, #a0522d, #cd853f);
}

.usuario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(139, 69, 19, 0.3);
}

.usuario-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.usuario-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: #fff8e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #5d2e0d;
}

.usuario-info h3 {
    color: #8b4513;
    font-size: 1.3em;
    margin-bottom: 5px;
    font-weight: bold;
}

.usuario-info p {
    color: #5d2e0d;
    font-size: 0.9em;
    margin: 0;
}

.usuario-detalhes p {
    margin: 8px 0;
    color: #2c3e50;
    font-size: 0.95em;
}

.usuario-detalhes strong {
    color: #8b4513;
    font-weight: bold;
}

.usuario-status {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.usuario-status.ativo {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff8e1;
}

.usuario-status.inativo {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff8e1;
}

.usuario-acoes {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.usuario-acoes .btn-usuario {
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Georgia', serif;
    font-size: 0.8em;
    border: 3px solid #5d2e0d;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
    transition: all 0.3s;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
    cursor: pointer;
    height: 36px;
    box-sizing: border-box;
}

.btn-ver-usuario {
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Georgia', serif;
    font-size: 0.8em;
    border: 3px solid #5d2e0d;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
    transition: all 0.3s;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
    cursor: pointer;
    height: 36px;
    box-sizing: border-box;
}

.sem-usuarios {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, #f5f5dc 0%, #fff8e1 100%);
    border: 3px solid #8b4513;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.2);
}

.sem-usuarios p {
    color: #5d2e0d;
    font-size: 1.2em;
    margin-bottom: 20px;
    font-style: italic;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content-confirmacao {
    background: white;
    border-radius: 15px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease-out;
}

.modal-content-recorte {
    background: white;
    border-radius: 15px;
    padding: 0;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease-out;
}

.modal-header {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
    line-height: 1.6;
}

.modal-body p {
    margin: 0 0 15px 0;
    color: #333;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
}

.btn-entendi {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-entendi:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* Modal de Recorte */
.crop-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.crop-area {
    position: relative;
    max-height: 400px;
    overflow: hidden;
    border-radius: 10px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cropImage {
    max-width: 100%;
    max-height: 400px;
    display: block;
    margin: 0 auto;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Funcionalidade de redimensionamento para o modal de recorte */
.crop-box {
    position: absolute;
    border: 3px solid #8b4513;
    background: rgba(139, 69, 19, 0.1);
    cursor: move;
    min-width: 100px;
    min-height: 100px;
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    z-index: 10;
    resize: both;
    overflow: hidden;
}

.crop-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    pointer-events: none;
}

.crop-box::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    background: #8b4513;
    border-radius: 50%;
    bottom: -12px;
    right: -12px;
    cursor: se-resize;
    z-index: 11;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.crop-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px 0;
}

.btn-crop {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-crop:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Cards de seleção de sprite melhorados */
.sprite-card {
    width: 100px;
    height: 100px;
    border: 3px solid #8b4513;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5dc 0%, #fff8e1 100%);
    margin: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.2);
}

.sprite-card:hover {
    border-color: #a0522d;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.3);
    background: linear-gradient(135deg, #f0e6d2 0%, #ffe4b5 100%);
}

.sprite-card.selected {
    border-color: #8b4513;
    background: linear-gradient(135deg, #d2b48c 0%, #cd853f 100%);
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.4);
    transform: translateY(-3px);
}

.sprite-card.selected::before {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #8b4513;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.sprite-card img {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.sprite-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sprites-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #faf0e6 0%, #f5f5dc 100%);
    border-radius: 15px;
    border: 2px solid #d2b48c;
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 10px;
    }
    .nav-btn {
        margin: 4px 0;
    }
    .user-menu-container {
        margin-left: 0;
        margin-top: 8px;
    }

    .container {
        padding-top: 120px;
    }

    .cadastro-form {
        padding: 25px;
        font-size: 14px;
    }

    .cadastro-form h2 {
        font-size: 1.6em;
    }
    
    .form-description {
        font-size: 1em;
        margin: 0 0 25px 0;
        padding: 0 10px;
    }

    .btn-cadastrar {
        min-width: 200px;
        padding: 14px 28px;
        font-size: 1em;
        margin: 25px auto 0 auto;
    }

    .filtros {
        flex-direction: column;
        align-items: stretch;
    }

    .filtros select {
        min-width: auto;
    }

    .animais-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .animal-card {
        padding: 20px;
    }

    .animal-header {
        flex-direction: column;
        text-align: center;
    }

    .animal-imagem {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 20px;
    }

    .cadastro-form {
        padding: 20px;
    }
    
    .form-description {
        font-size: 0.95em;
        margin: 0 0 20px 0;
        padding: 0 5px;
    }

    .btn-cadastrar {
        min-width: 180px;
        padding: 12px 24px;
        font-size: 0.9em;
        margin: 20px auto 0 auto;
    }

    .sprites-grid {
        gap: 10px;
        justify-content: center;
    }
    
    .sprite-card {
        padding: 10px;
        margin: 3px;
    }
    
    .sprite-card img {
        width: 50px;
        height: 50px;
    }
} 

/* ===== MENU RESPONSIVO ===== */
.menu-mobile-btn {
  display: none;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 16px;
  font-family: 'Courier New', monospace;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
  margin-right: 8px;
  min-width: 44px;
  height: 40px;
  transition: background 0.2s, color 0.2s;
}
.menu-mobile-btn:hover {
  background: #f5f5f5;
}
@media (max-width: 1495px) {
  .menu-mobile-btn {
    display: inline-flex !important;
  }
  .menu-acoes {
    display: none !important;
  }
}
@media (min-width: 1496px) {
  .menu-mobile-btn {
    display: none !important;
  }
  .menu-acoes {
    display: flex !important;
  }
} 

.modal-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.modal-mobile-overlay.show {
  display: flex !important;
}
.modal-mobile-content {
  background: #eae6d5;
  border: 3px solid #000;
  border-radius: 12px;
  box-shadow: 0 4px 24px #0008;
  padding: 24px 16px 16px 16px;
  max-width: 95vw;
  width: 350px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.modal-mobile-content .btn-fechar-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  font-size: 22px;
  border-radius: 6px;
  border: 2px solid #000;
  background: #fff;
  box-shadow: 2px 2px 0 #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}
.menu-acoes-mobile {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 48px;
}
/* --- Força o estilo correto dos botões do modal menu mobile (apenas este bloco deve existir) --- */
.menu-acoes-mobile .menu-mobile-btn {
  width: 100% !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
  text-align: center !important;
  font-size: 16px !important;
  padding: 12px 0 !important;
  border-radius: 30px !important;
  background: linear-gradient(135deg, #8b4513, #a0522d) !important;
  border: 3px solid #5d2e0d !important;
  color: #fff !important;
  font-family: 'Georgia', serif !important;
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2) !important;
  cursor: pointer !important;
  transition: all 0.3s !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  font-weight: bold !important;
  letter-spacing: 0.5px !important;
  text-decoration: none !important;
}
.menu-acoes-mobile .menu-mobile-btn:hover {
  background: linear-gradient(135deg, #a0522d, #cd853f) !important;
  color: #fff !important;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
}
.menu-acoes-mobile #btnSairMobile.menu-mobile-btn {
  background: #fff !important;
  color: #8b4513 !important;
  border: 3px solid #8b4513 !important;
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.12) !important;
}
.menu-acoes-mobile #btnSairMobile.menu-mobile-btn:hover {
  background: #fbeee0 !important;
  color: #a0522d !important;
  border-color: #a0522d !important;
}
/* --- FIM do bloco de estilo forçado --- */ 