/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
    color: #333;
    overflow-x: hidden;
    position: relative;
    /* Melhora a renderização em dispositivos móveis */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Evita zoom indesejado em inputs no iOS */
    -webkit-text-size-adjust: 100%;
}

/* Melhora a responsividade em dispositivos touch */
@media (pointer: coarse) {
    /* Aumenta área de toque em dispositivos touch */
    .user-type-btn,
    .login-btn,
    .back-btn,
    .close-btn,
    .edit-btn,
    .delete-btn,
    .save-btn,
    .cancel-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Variáveis de cores do tema Canadá */
:root {
    --primary-red: #FF0000;
    --dark-red: #CC0000;
    --light-red: #FF3333;
    --bright-red: #FF1a1a;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --gray: #6C757D;
    --dark-gray: #343A40;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(255, 0, 0, 0.2);
    --shadow-strong: rgba(0, 0, 0, 0.15);
    --gradient-red: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    --gradient-red-hover: linear-gradient(135deg, var(--bright-red) 0%, var(--primary-red) 100%);
}

/* Decorações de fundo */
.background-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.maple-leaf {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 0, 0, 0.1);
    animation: floatMaple 15s infinite linear;
    opacity: 0.6;
}

.maple-leaf-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.maple-leaf-2 {
    top: 70%;
    left: 80%;
    animation-delay: -5s;
    animation-duration: 25s;
}

.maple-leaf-3 {
    top: 30%;
    left: 70%;
    animation-delay: -10s;
    animation-duration: 18s;
}

.maple-leaf-4 {
    top: 80%;
    left: 20%;
    animation-delay: -15s;
    animation-duration: 22s;
}

.maple-leaf-5 {
    top: 50%;
    left: 90%;
    animation-delay: -8s;
    animation-duration: 30s;
}

@keyframes floatMaple {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-20px) rotate(360deg);
        opacity: 0.3;
    }
}

/* Configurações de tela com transições suaves */
.screen {
    display: none;
    min-height: 100vh;
    opacity: 0;
    transform: translateX(100px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateX(0) scale(1);
}

.screen.slide-out-left {
    transform: translateX(-100px) scale(0.95);
    opacity: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Tela Inicial */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

/* Decoração da bandeira do Canadá */
.canada-flag-decoration {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    height: 6px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
}

.flag-stripe {
    height: 100%;
    position: relative;
}

.red-stripe {
    background: var(--gradient-red);
    width: 50px;
}

.white-stripe {
    background: var(--white);
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.maple-icon {
    font-size: 1rem;
    color: var(--primary-red);
    animation: pulse 2s infinite;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.logo-wrapper {
    position: relative;
    display: inline-block;
}

.logo {
    width: 90px;
    height: 90px;
    filter: drop-shadow(0 8px 16px var(--shadow));
    animation: logoFloat 3s ease-in-out infinite;
    transition: all 0.5s ease;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    padding: 10px;
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 12px 25px var(--shadow-hover));
}

.logo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: conic-gradient(var(--primary-red), var(--white), var(--primary-red));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.2); }
}

.app-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-red);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 8px var(--shadow);
    position: relative;
    display: flex;
    gap: 2px;
}

.title-letter {
    display: inline-block;
    animation: letterBounce 0.6s ease forwards;
    animation-delay: calc(var(--i) * 0.1s);
    transform: translateY(20px);
    opacity: 0;
}

.title-letter:nth-child(1) { --i: 0; }
.title-letter:nth-child(2) { --i: 1; }
.title-letter:nth-child(3) { --i: 2; }
.title-letter:nth-child(4) { --i: 3; }
.title-letter:nth-child(5) { --i: 4; }
.title-letter:nth-child(6) { --i: 5; }
.title-letter:nth-child(7) { --i: 6; }
.title-letter:nth-child(8) { --i: 7; }
.title-letter:nth-child(9) { --i: 8; }

@keyframes letterBounce {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Título simplificado para mobile - inicialmente oculto */
.app-title-mobile {
    display: none;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-red);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin: 0;
    padding: 0;
    line-height: 1;
    height: auto;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--gray);
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    animation: fadeInUp 1s ease 0.5s both;
}

.subtitle i {
    color: var(--primary-red);
    font-size: 1.1rem;
    animation: mapleRotate 3s ease-in-out infinite alternate;
}

@keyframes mapleRotate {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

.main-content {
    max-width: 900px;
    margin: 0 auto;
}

.welcome-section {
    text-align: center;
    margin-bottom: 70px;
    animation: fadeInUp 1s ease 0.8s both;
}

.welcome-title {
    font-size: 2.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--primary-red) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    position: relative;
}

.welcome-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-red);
    border-radius: 2px;
    animation: expandLine 1s ease 1.3s both;
}

@keyframes expandLine {
    0% { width: 0; }
    100% { width: 100px; }
}

.welcome-description {
    font-size: 1.2rem;
    color: var(--gray);
    font-weight: 400;
}

.user-type-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

/* Botões super aprimorados com efeitos do Canadá */
.user-type-btn {
    position: relative;
    background: var(--white);
    border: 3px solid var(--primary-red);
    border-radius: 25px;
    padding: 50px 40px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    box-shadow: 0 12px 30px var(--shadow);
    animation: slideInUp 0.8s ease both;
    transform-origin: center;
}

.user-type-btn:nth-child(1) { animation-delay: 1s; }
.user-type-btn:nth-child(2) { animation-delay: 1.2s; }

.user-type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-red);
    z-index: 1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.user-type-btn:hover::before {
    transform: scaleX(1);
}

.btn-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,0,0,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-type-btn:hover .btn-background {
    opacity: 1;
}

.btn-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    transition: all 0.4s ease;
}

.btn-icon {
    position: relative;
    font-size: 4rem;
    color: var(--primary-red);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-type-btn:hover .btn-icon {
    color: var(--white);
    transform: scale(1.2) rotate(5deg);
}

.icon-particles {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: conic-gradient(transparent, var(--primary-red), transparent);
    border-radius: 50%;
    opacity: 0;
    animation: rotateParticles 2s linear infinite;
}

.user-type-btn:hover .icon-particles {
    opacity: 0.3;
}

@keyframes rotateParticles {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-gray);
    transition: all 0.4s ease;
    text-align: center;
}

.user-type-btn:hover .btn-text {
    color: var(--white);
    transform: translateY(-3px);
}

.btn-maple {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    opacity: 0.3;
    transition: all 0.4s ease;
    animation: mapleFloat 3s ease-in-out infinite;
}

.user-type-btn:hover .btn-maple {
    opacity: 0.8;
    color: var(--white);
    transform: scale(1.3) rotate(10deg);
}

@keyframes mapleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    z-index: 2;
    transition: left 0.6s ease;
}

.user-type-btn:hover .btn-shine {
    left: 100%;
}

.btn-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: all 0.6s ease;
}

.user-type-btn:active .btn-ripple {
    width: 300px;
    height: 300px;
}

.user-type-btn:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px var(--shadow-hover);
    border-color: var(--dark-red);
}

.user-type-btn:active {
    transform: translateY(-5px) scale(0.98);
    transition: all 0.1s ease;
}

/* Seção principal e botões super aprimorados */
.main-content {
    max-width: 900px;
    margin: 0 auto;
}

.welcome-section {
    text-align: center;
    margin-bottom: 70px;
    animation: fadeInUp 1s ease 0.8s both;
}

.welcome-title {
    font-size: 2.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--primary-red) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    position: relative;
}

.welcome-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-red);
    border-radius: 2px;
    animation: expandLine 1s ease 1.3s both;
}

@keyframes expandLine {
    0% { width: 0; }
    100% { width: 100px; }
}

.welcome-description {
    font-size: 1.2rem;
    color: var(--gray);
    font-weight: 400;
}

.user-type-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

/* Botões super aprimorados com efeitos do Canadá */
.user-type-btn {
    position: relative;
    background: var(--white);
    border: 3px solid var(--primary-red);
    border-radius: 25px;
    padding: 50px 40px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    box-shadow: 0 12px 30px var(--shadow);
    animation: slideInUp 0.8s ease both;
    transform-origin: center;
}

.user-type-btn:nth-child(1) { animation-delay: 1s; }
.user-type-btn:nth-child(2) { animation-delay: 1.2s; }

.user-type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-red);
    z-index: 1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.user-type-btn:hover::before {
    transform: scaleX(1);
}

.btn-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,0,0,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-type-btn:hover .btn-background {
    opacity: 1;
}

.btn-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    transition: all 0.4s ease;
}

.btn-icon {
    position: relative;
    font-size: 4rem;
    color: var(--primary-red);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-type-btn:hover .btn-icon {
    color: var(--white);
    transform: scale(1.2) rotate(5deg);
}

.icon-particles {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: conic-gradient(transparent, var(--primary-red), transparent);
    border-radius: 50%;
    opacity: 0;
    animation: rotateParticles 2s linear infinite;
}

.user-type-btn:hover .icon-particles {
    opacity: 0.3;
}

@keyframes rotateParticles {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-gray);
    transition: all 0.4s ease;
    text-align: center;
}

.user-type-btn:hover .btn-text {
    color: var(--white);
    transform: translateY(-3px);
}

.btn-maple {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    opacity: 0.3;
    transition: all 0.4s ease;
    animation: mapleFloat 3s ease-in-out infinite;
}

.user-type-btn:hover .btn-maple {
    opacity: 0.8;
    color: var(--white);
    transform: scale(1.3) rotate(10deg);
}

@keyframes mapleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    z-index: 2;
    transition: left 0.6s ease;
}

.user-type-btn:hover .btn-shine {
    left: 100%;
}

.btn-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: all 0.6s ease;
}

.user-type-btn:active .btn-ripple {
    width: 300px;
    height: 300px;
}

.user-type-btn:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px var(--shadow-hover);
    border-color: var(--dark-red);
}

.user-type-btn:active {
    transform: translateY(-5px) scale(0.98);
    transition: all 0.1s ease;
}

/* Telas de Login com efeitos avançados */
.login-container {
    max-width: 450px;
    margin: 80px auto;
    background: var(--white);
    border-radius: 25px;
    padding: 45px;
    box-shadow: 0 20px 60px var(--shadow-strong);
    animation: scaleInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 0, 0, 0.1);
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-red);
    animation: loadingBar 2s ease-in-out infinite;
}

@keyframes loadingBar {
    0%, 100% { transform: scaleX(0.3); opacity: 0.5; }
    50% { transform: scaleX(1); opacity: 1; }
}

@keyframes scaleInUp {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.canada-stripe {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: conic-gradient(var(--primary-red), var(--white), var(--primary-red));
    border-radius: 50%;
    opacity: 0.1;
    animation: rotateStripe 10s linear infinite;
}

@keyframes rotateStripe {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    z-index: 2;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 0;
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid var(--primary-red);
    font-size: 1.3rem;
    color: var(--primary-red);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 12px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.back-btn:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

.btn-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 30%, rgba(255,255,255,0.3) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.back-btn:hover .btn-hover-effect {
    opacity: 1;
}

.login-title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.login-icon {
    font-size: 2.5rem;
    color: var(--primary-red);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.login-header h2 {
    font-size: 2.2rem;
    color: var(--dark-gray);
    font-weight: 600;
    margin: 0;
}

.title-underline {
    width: 60px;
    height: 3px;
    background: var(--gradient-red);
    border-radius: 2px;
    animation: expandUnderline 0.8s ease 0.5s both;
}

@keyframes expandUnderline {
    0% { width: 0; }
    100% { width: 60px; }
}

/* Campos de entrada super estilizados */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    z-index: 2;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--light-gray);
    border-radius: 15px;
    padding: 18px 20px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
    overflow: hidden;
    animation: slideInLeft 0.6s ease both;
}

.input-group:nth-child(1) { animation-delay: 0.3s; }
.input-group:nth-child(2) { animation-delay: 0.4s; }

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.input-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,0,0,0.05) 60%, transparent 80%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-group:focus-within .input-decoration {
    opacity: 1;
}

.input-group:focus-within {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1);
    transform: translateY(-2px);
    background: var(--white);
}

.input-group i {
    color: var(--primary-red);
    font-size: 1.3rem;
    margin-right: 18px;
    transition: all 0.3s ease;
    z-index: 2;
}

.input-group:focus-within i {
    transform: scale(1.1);
    color: var(--dark-red);
}

.input-group input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    font-size: 1.1rem;
    color: var(--dark-gray);
    font-family: inherit;
    font-weight: 500;
    z-index: 2;
}

.input-group input::placeholder {
    color: var(--gray);
    font-weight: 400;
}

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-red);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.input-group:focus-within .input-focus-line {
    width: 100%;
}

/* Botão de login super estilizado */
.login-btn {
    background: var(--gradient-red);
    color: var(--white);
    border: none;
    border-radius: 15px;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.6s ease 0.5s both;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.btn-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-red-hover);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-btn:hover .btn-gradient {
    opacity: 1;
}

.btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.login-btn:hover .btn-content {
    transform: translateY(-1px);
}

.btn-waves {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.login-btn:hover .btn-waves {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 0, 0, 0.4);
}

.login-btn:active {
    transform: translateY(-1px);
    transition: all 0.1s ease;
}

.error-message {
    color: var(--primary-red);
    text-align: center;
    margin-top: 15px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow);
    margin-bottom: 30px;
    animation: slideInDown 0.6s ease;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.user-info i {
    color: var(--primary-red);
    font-size: 1.5rem;
}

.logout-btn {
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.logout-btn:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
}

.dashboard-content {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--dark-gray);
    font-weight: 600;
}

.add-btn {
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 1rem;
}

.add-btn:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.3);
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.student-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px var(--shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
    animation: cardSlideIn 0.6s ease both;
    position: relative;
    overflow: hidden;
}

/* Efeito de entrada escalonado para cards */
.student-card:nth-child(1) { animation-delay: 0.1s; }
.student-card:nth-child(2) { animation-delay: 0.2s; }
.student-card:nth-child(3) { animation-delay: 0.3s; }
.student-card:nth-child(4) { animation-delay: 0.4s; }
.student-card:nth-child(5) { animation-delay: 0.5s; }
.student-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.student-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.student-card:hover::before {
    transform: scaleX(1);
}

.student-card::after {
    content: '🍁';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.2rem;
    opacity: 0.2;
    transition: all 0.4s ease;
    animation: mapleRotateCard 4s ease-in-out infinite;
}

@keyframes mapleRotateCard {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

.student-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px var(--shadow-hover);
    border-color: var(--primary-red);
}

.student-card h3 {
    color: var(--dark-gray);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.student-card:hover h3 {
    color: var(--primary-red);
    transform: translateX(5px);
}

.student-card p {
    color: var(--gray);
    margin-bottom: 25px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.student-card:hover p {
    color: var(--dark-gray);
}

.card-actions {
    display: flex;
    gap: 12px;
}

.edit-btn, .delete-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

.edit-btn::before,
.delete-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.edit-btn:hover::before,
.delete-btn:hover::before {
    left: 100%;
}

.edit-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    flex: 1;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #138496, #0f6674);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    flex: 1;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
}

.edit-btn:active,
.delete-btn:active {
    transform: translateY(0);
}

/* Tela do Aluno */
.welcome-card {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease;
}

.welcome-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.welcome-card p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.student-info-card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px var(--shadow);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.student-info-card h3 {
    color: var(--dark-gray);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 15px;
}

.info-item label {
    font-weight: 600;
    color: var(--dark-gray);
}

.info-item span {
    color: var(--gray);
}

.student-info-card .edit-btn {
    width: 100%;
    justify-content: center;
    padding: 15px;
    margin-top: 20px;
    font-size: 1.1rem;
}

/* Modais com efeitos avançados */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: modalFadeIn 0.4s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes modalFadeIn {
    0% {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    100% {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.modal-content {
    background: var(--white);
    border-radius: 25px;
    padding: 35px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: modalSlideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    border: 3px solid rgba(255, 0, 0, 0.1);
}

@keyframes modalSlideUp {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-red);
    border-radius: 25px 25px 0 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--light-gray);
    position: relative;
}

.modal-header::after {
    content: '🍁';
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.2;
    animation: mapleFloat 3s ease-in-out infinite;
}

.modal-header h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0;
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--primary-red) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-btn {
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid var(--primary-red);
    font-size: 1.3rem;
    color: var(--primary-red);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.close-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-red);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.close-btn:hover::before {
    transform: scale(1);
}

.close-btn:hover {
    color: var(--white);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.close-btn i {
    position: relative;
    z-index: 2;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.modal-form .input-group {
    animation: modalInputSlide 0.5s ease both;
}

.modal-form .input-group:nth-child(1) { animation-delay: 0.1s; }
.modal-form .input-group:nth-child(2) { animation-delay: 0.2s; }
.modal-form .input-group:nth-child(3) { animation-delay: 0.3s; }

@keyframes modalInputSlide {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    animation: modalActionsSlide 0.5s ease 0.4s both;
}

@keyframes modalActionsSlide {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.cancel-btn, .save-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.cancel-btn::before,
.save-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.cancel-btn:hover::before,
.save-btn:hover::before {
    left: 100%;
}

.cancel-btn {
    background: linear-gradient(135deg, var(--gray), var(--dark-gray));
    color: var(--white);
    border: 2px solid transparent;
}

.cancel-btn:hover {
    background: linear-gradient(135deg, var(--dark-gray), #2c3034);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.4);
}

.save-btn {
    background: var(--gradient-red);
    color: var(--white);
    border: 2px solid transparent;
}

.save-btn:hover {
    background: var(--gradient-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
}

.cancel-btn:active,
.save-btn:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

/* Animações globais melhoradas */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Efeitos de transição para troca de telas */
.screen-transition-enter {
    animation: screenSlideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.screen-transition-exit {
    animation: screenSlideOut 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes screenSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes screenSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-100px) scale(0.95);
    }
}

/* Estado de carregamento com folha de maple */
.loading-maple {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: var(--primary-red);
    animation: loadingRotate 2s linear infinite;
    z-index: 9999;
}

@keyframes loadingRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.2); }
    100% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

/* Responsividade melhorada com breakpoints específicos */
@media (max-width: 1200px) {
    .container {
        padding: 18px;
    }
    
    .user-type-selection {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 450px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    /* Header responsivo */
    .header {
        margin-bottom: 25px;
    }
    
    .app-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin: 0;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .logo {
        width: 65px;
        height: 65px;
        padding: 5px;
        animation: none; /* Remove animação em mobile */
    }
    
    .logo-container {
        gap: 15px;
        margin-bottom: 18px;
        margin-top: 0;
    }
    
    .logo-glow {
        display: none; /* Remove glow em mobile */
    }
    
    .canada-flag-decoration {
        margin-bottom: 15px;
        height: 4px;
    }
    
    .red-stripe {
        width: 40px;
    }
    
    .white-stripe {
        width: 80px;
    }
    
    /* Botões principais responsivos */
    .user-type-btn {
        padding: 35px 25px;
        border-radius: 20px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .btn-icon {
        font-size: 3.2rem;
        margin-bottom: 15px;
    }
    
    .btn-text {
        font-size: 1.5rem;
    }
    
    .user-type-selection {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 450px;
    }
    
    /* Login responsivo */
    .login-container {
        margin: 50px auto;
        padding: 30px;
        border-radius: 20px;
        width: 90%;
        max-width: 450px;
    }
    
    .login-header h2 {
        font-size: 1.7rem;
    }
    
    .input-group {
        padding: 15px 18px;
        font-size: 16px; /* Evita zoom automático no iOS */
    }
    
    .input-group input {
        font-size: 16px;
    }
    
    /* Dashboard responsivo */
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 25px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    /* Cards responsivos */
    .students-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .student-card {
        padding: 25px;
        border-radius: 15px;
    }
    
    /* Modal responsivo */
    .modal-content {
        width: 92%;
        padding: 25px;
        border-radius: 20px;
        max-height: 85vh;
        margin: 20px auto;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .cancel-btn, .save-btn {
        padding: 12px 20px;
        justify-content: center;
        min-height: 45px;
    }
    
    /* Elementos flutuantes responsivos */
    .floating-maple {
        font-size: 1.2rem;
    }
    
    .maple-leaf {
        font-size: 1.5rem;
    }
    
    /* Ajustes específicos para melhor usabilidade */
    .welcome-card {
        padding: 25px 20px;
        margin-bottom: 25px;
    }
    
    .student-info-card {
        padding: 25px;
    }
    
    /* Login hint responsivo */
    .login-hint {
        padding: 15px;
        font-size: 13px;
        margin: 20px 0;
    }
}

@media (max-width: 480px) {
    /* Mobile pequeno */
    .container {
        padding: 10px;
    }
    
    .header {
        margin-bottom: 20px;
        margin-top: 0;
    }
    
    /* Esconde título complexo e mostra versão simples */
    .app-title {
        display: none;
    }
    
    .app-title-mobile {
        display: block;
        font-size: 1.4rem;
    }
    
    .title-letter {
        display: inline;
        animation: none; /* Remove animação das letras */
        transform: none;
        opacity: 1;
        font-size: inherit;
        line-height: inherit;
        margin: 0;
        padding: 0;
    }
    
    /* Simplifica o título em mobile */
    .app-title .title-letter:nth-child(4),
    .app-title .title-letter:nth-child(8) {
        display: none; /* Remove espaços extras */
    }
    
    .welcome-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
        margin-top: 15px;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 10px;
        align-items: center;
        margin-top: 0;
        padding: 0;
        max-height: 80px;
        overflow: hidden;
        justify-content: center;
    }
    
    .app-title {
        margin-top: 5px;
        margin-bottom: 10px;
    }
    
    .logo {
        width: 50px;
        height: 50px;
        padding: 3px;
        animation: none;
        transform: none;
    }
    
    .logo-wrapper {
        margin: 0;
        padding: 0;
    }
    
    .logo-glow {
        display: none;
    }
    
    .subtitle {
        font-size: 0.9rem;
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
    }
    
    /* Botões mobile */
    .user-type-btn {
        padding: 25px 15px;
        border-radius: 16px;
        min-height: 120px;
    }
    
    .btn-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .btn-text {
        font-size: 1.2rem;
    }
    
    /* Login mobile */
    .login-container {
        margin: 20px auto;
        padding: 20px;
        width: 95%;
    }
    
    .login-header h2 {
        font-size: 1.4rem;
    }
    
    .back-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .input-group {
        padding: 14px 16px;
        margin-bottom: 15px;
    }
    
    .input-group input {
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    /* Cards mobile */
    .student-card {
        padding: 18px;
    }
    
    .student-card h3 {
        font-size: 1.1rem;
    }
    
    .card-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .edit-btn, .delete-btn {
        justify-content: center;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    /* Modal mobile */
    .modal-content {
        width: 95%;
        padding: 18px;
        margin: 15px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .welcome-card {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .welcome-card h2 {
        font-size: 1.6rem;
    }
    
    .student-info-card {
        padding: 18px;
    }
    
    /* Ajustes para elementos da bandeira */
    .canada-flag-decoration {
        margin-bottom: 10px;
        height: 3px;
    }
    
    .red-stripe {
        width: 35px;
    }
    
    .white-stripe {
        width: 70px;
    }
    
    .maple-icon {
        font-size: 0.8rem;
    }
}

/* Breakpoint para telas muito pequenas */
@media (max-width: 360px) {
    .container {
        padding: 8px;
    }
    
    .header {
        margin-bottom: 15px;
        margin-top: 0;
    }
    
    /* Título mobile ainda mais compacto */
    .app-title {
        display: none;
    }
    
    .app-title-mobile {
        display: block;
        font-size: 1.2rem;
    }
    
    .welcome-title {
        font-size: 1.4rem;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    .logo-container {
        gap: 3px;
        margin-bottom: 8px;
        margin-top: 0;
        padding: 0;
        max-height: 60px;
        overflow: hidden;
        justify-content: center;
    }
    
    .logo {
        width: 40px;
        height: 40px;
        padding: 2px;
    }
    
    .logo-wrapper {
        margin: 0;
        padding: 0;
    }
    
    .subtitle {
        font-size: 0.85rem;
        margin-top: 8px;
    }
    
    .canada-flag-decoration {
        margin-bottom: 8px;
        height: 2px;
    }
    
    .red-stripe {
        width: 30px;
    }
    
    .white-stripe {
        width: 60px;
    }
    
    .user-type-btn {
        padding: 20px 12px;
        min-height: 100px;
    }
    
    .btn-icon {
        font-size: 2.2rem;
    }
    
    .btn-text {
        font-size: 1.1rem;
    }
    
    .login-container {
        padding: 15px;
        margin: 15px auto;
    }
    
    .modal-content {
        padding: 15px;
        width: 98%;
    }
    
    .input-group {
        padding: 12px 14px;
    }
}

/* Orientação landscape em dispositivos móveis */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        padding: 5px;
    }
    
    .header {
        margin-bottom: 5px;
        margin-top: 0;
    }
    
    .logo-container {
        gap: 3px;
        margin-bottom: 5px;
        margin-top: 0;
        padding: 0;
        max-height: 40px;
        overflow: hidden;
        justify-content: center;
        flex-direction: row; /* Muda para row em landscape */
    }
    
    /* Título mobile em landscape */
    .app-title {
        display: none;
    }
    
    .app-title-mobile {
        display: block;
        font-size: 1rem;
        margin-left: 10px;
    }
    
    .logo {
        width: 35px;
        height: 35px;
        padding: 2px;
        animation: none;
    }
    
    .logo-wrapper {
        margin: 0;
        padding: 0;
    }
    
    .logo-glow {
        display: none;
    }
    
    .welcome-title {
        font-size: 1.3rem;
        margin: 5px 0;
    }
    
    .canada-flag-decoration {
        margin-bottom: 5px;
        height: 2px;
    }
    
    .subtitle {
        font-size: 0.8rem;
        margin: 3px 0;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
    
    .user-type-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin: 20px 0;
    }
    
    .user-type-btn {
        padding: 20px 15px;
        min-height: 80px;
    }
    
    .btn-icon {
        font-size: 2rem;
        margin-bottom: 5px;
    }
    
    .btn-text {
        font-size: 1rem;
    }
    
    .login-container {
        margin: 20px auto;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Media query para telas grandes */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .user-type-selection {
        grid-template-columns: repeat(2, 400px);
        justify-content: center;
        gap: 50px;
    }
    
    .students-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 35px;
    }
}

/* Acessibilidade melhorada */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .maple-leaf,
    .floating-maple,
    .btn-maple {
        animation: none !important;
    }
}

/* Foco aprimorado para navegação por teclado */
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--primary-red);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(255, 0, 0, 0.2);
}

.user-type-btn:focus-visible {
    outline: 4px solid var(--primary-red);
    outline-offset: 4px;
}

/* Alto contraste */
@media (prefers-contrast: high) {
    :root {
        --primary-red: #CC0000;
        --dark-red: #990000;
        --shadow: rgba(0, 0, 0, 0.4);
        --shadow-hover: rgba(204, 0, 0, 0.4);
    }
    
    .user-type-btn {
        border-width: 4px;
    }
    
    .student-card {
        border: 2px solid var(--primary-red);
    }
    
    .input-group {
        border: 2px solid var(--gray);
    }
}

/* Modo escuro (para futuras implementações) */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --light-gray: #2d2d2d;
        --dark-gray: #ffffff;
        --gray: #cccccc;
    }
    
    body {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
        color: #ffffff;
    }
}

/* Efeitos de flutuação para elementos de login */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-maple {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(255, 0, 0, 0.2);
    animation: floatSlow 8s ease-in-out infinite;
}

.floating-maple:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-maple:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: -2s;
}

.floating-maple:nth-child(3) {
    top: 40%;
    left: 20%;
    animation-delay: -4s;
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-15px) rotate(10deg);
        opacity: 0.4;
    }
}

/* Firebase Status Indicator */
.firebase-status {
    position: fixed;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
}

.firebase-status.offline {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.firebase-status .status-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.firebase-status .maple-indicator {
    animation: mapleFloat 2s ease-in-out infinite;
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* Loading container styles */
.loading-container {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
    font-size: 1.1rem;
    font-weight: 500;
    animation: pulse 1.5s ease-in-out infinite;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--primary-red);
    font-size: 1rem;
}

.error-message i {
    display: block;
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Offline indicator */
.offline-badge {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-red);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    z-index: 9998;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(50px) scale(0.3);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px) scale(1.05);
    }
    70% {
        transform: translateX(-50%) translateY(5px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Firebase connection animation */
.firebase-connecting {
    position: relative;
}

.firebase-connecting::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(var(--primary-red), transparent, var(--primary-red));
    border-radius: inherit;
    z-index: -1;
    animation: firebaseConnectSpin 2s linear infinite;
}

@keyframes firebaseConnectSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sync indicator */
.sync-indicator {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    padding: 15px;
    border-radius: 50%;
    font-size: 1.2rem;
    animation: syncPulse 1s ease-in-out infinite;
    z-index: 9997;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@keyframes syncPulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-50%) scale(1.1);
        opacity: 1;
    }
}

/* Dark mode support for Firebase indicators */
@media (prefers-color-scheme: dark) {
    .firebase-status {
        background: linear-gradient(135deg, #1a5a2e, #176a3d);
        color: #ffffff;
    }
    
    .firebase-status.offline {
        background: linear-gradient(135deg, #8b1e2b, #721e29);
    }
    
    .sync-indicator {
        background: rgba(26, 26, 26, 0.95);
        color: #ff3333;
        border-color: #ff3333;
    }
}

/* Login hint styles */
.login-hint {
    background: linear-gradient(135deg, #fff9c4, #fef3cd);
    border: 2px solid #ffd700;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
    animation: hintPulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.login-hint::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: hintShine 3s ease-in-out infinite;
}

.hint-icon {
    font-size: 20px;
    animation: bounce 2s ease-in-out infinite;
}

.hint-content {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
    color: #8b6914;
}

.hint-content strong {
    color: #cc0000;
    font-weight: 600;
}

.hint-content small {
    opacity: 0.8;
    font-style: italic;
}

@keyframes hintPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes hintShine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

/* Responsive adjustments for hint */
@media (max-width: 768px) {
    .login-hint {
        padding: 12px;
        font-size: 12px;
    }
    
    .hint-icon {
        font-size: 18px;
    }
}
