/* Ocean Theme Design System */
:root {
    /* Ocean Theme Colors */
    --background: hsl(220, 30%, 8%);
    --foreground: hsl(210, 40%, 98%);
    
    --card: hsl(220, 25%, 12%);
    --card-foreground: hsl(210, 40%, 98%);
    
    --primary: hsl(210, 100%, 55%);
    --primary-foreground: hsl(220, 30%, 8%);
    --primary-glow: hsl(210, 100%, 65%);
    
    --secondary: hsl(220, 20%, 18%);
    --secondary-foreground: hsl(210, 40%, 98%);
    
    --muted: hsl(220, 15%, 15%);
    --muted-foreground: hsl(210, 20%, 65%);
    
    --accent: hsl(200, 100%, 45%);
    --accent-foreground: hsl(210, 40%, 98%);
    
    --border: hsl(220, 20%, 20%);
    --input: hsl(220, 20%, 16%);
    --ring: hsl(210, 100%, 55%);
    
    /* Ocean Gradients */
    --gradient-ocean: linear-gradient(135deg, hsl(220, 30%, 8%) 0%, hsl(210, 50%, 15%) 50%, hsl(200, 60%, 20%) 100%);
    --gradient-wave: linear-gradient(90deg, hsl(210, 100%, 55%) 0%, hsl(200, 100%, 65%) 50%, hsl(210, 100%, 55%) 100%);
    --gradient-card: linear-gradient(145deg, hsl(220, 25%, 12%) 0%, hsl(220, 20%, 16%) 100%);
    
    /* Ocean Shadows */
    --shadow-ocean: 0 10px 30px -10px hsl(210, 100%, 20%);
    --shadow-glow: 0 0 40px hsla(210, 100%, 55%, 0.3);
    --shadow-card: 0 8px 32px hsla(220, 60%, 5%, 0.6);
    
    --radius: 0.75rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-ocean);
    color: var(--foreground);
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Container */
.login-container {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* Background Elements */
.background-elements {
    position: absolute;
    inset: 0;
    opacity: 0.1;
}

.floating-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(3rem);
    animation: float 4s ease-in-out infinite;
}

.blob-1 {
    top: 5rem;
    left: 2.5rem;
    width: 24rem;
    height: 24rem;
    background: hsla(210, 100%, 55%, 0.2);
}

.blob-2 {
    bottom: 5rem;
    right: 2.5rem;
    width: 20rem;
    height: 20rem;
    background: hsla(200, 100%, 45%, 0.2);
    animation-delay: 0.2s;
}

.blob-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18rem;
    height: 18rem;
    background: hsla(210, 100%, 65%, 0.15);
    animation-delay: 0.3s;
}

/* Liquid Blobs */
.liquid-blob {
    position: absolute;
    filter: blur(2rem);
}

.liquid-1 {
    top: 2.5rem;
    right: 5rem;
    width: 13rem;
    height: 13rem;
    background: hsla(210, 100%, 55%, 0.12);
    animation: liquidMove 8s ease-in-out infinite;
}

.liquid-2 {
    bottom: 4rem;
    left: 4rem;
    width: 10rem;
    height: 10rem;
    background: hsla(200, 100%, 45%, 0.18);
    animation: liquidMove2 10s ease-in-out infinite;
    animation-delay: 0.1s;
}

.liquid-3 {
    top: 25%;
    left: 25%;
    width: 9rem;
    height: 9rem;
    background: hsla(210, 100%, 65%, 0.14);
    animation: liquidMove3 12s ease-in-out infinite;
    animation-delay: 0.2s;
}

.liquid-4 {
    bottom: 33%;
    right: 25%;
    width: 11rem;
    height: 11rem;
    background: hsla(210, 100%, 55%, 0.1);
    animation: liquidMorph 6s ease-in-out infinite;
    animation-delay: 0.3s;
}

/* Ocean Waves */
.ocean-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gradient-wave);
    background-size: 200% 100%;
    animation: wave 3s ease-in-out infinite;
}

.wave-1 {
    height: 8rem;
    opacity: 0.2;
}

.wave-2 {
    height: 6rem;
    opacity: 0.3;
    animation-delay: 0.1s;
}

/* Login Content */
.login-content {
    width: 100%;
    max-width: 28rem;
    position: relative;
    z-index: 10;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background: var(--gradient-card);
    box-shadow: var(--shadow-glow);
    margin-bottom: 1rem;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    color: var(--primary);
}

.title {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--muted-foreground);
}

/* Login Card */
.login-card {
    background: var(--gradient-card);
    box-shadow: var(--shadow-card);
    border: 1px solid hsla(220, 20%, 20%, 0.5);
    border-radius: var(--radius);
    backdrop-filter: blur(0.5rem);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.card-description {
    color: var(--muted-foreground);
    text-align: center;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    width: 1rem;
    height: 1rem;
    color: var(--muted-foreground);
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    background: var(--input);
    border: 1px solid hsla(220, 20%, 20%, 0.5);
    border-radius: calc(var(--radius) - 2px);
    color: var(--foreground);
    font-size: 0.875rem;
    transition: all 0.2s;
}

input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--foreground);
}

.eye-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid hsla(220, 20%, 20%, 0.5);
    background: var(--input);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-container label {
    font-size: 0.875rem;
    color: var(--foreground);
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-container label a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.checkbox-container label a:hover {
    color: var(--primary-glow);
    text-decoration: underline;
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.forgot-password:hover {
    color: var(--primary-glow);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-glow);
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.submit-btn:hover {
    background: var(--primary-glow);
    box-shadow: 0 0 40px hsla(210, 100%, 55%, 0.4);
}

.btn-arrow {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s;
}

.submit-btn:hover .btn-arrow {
    transform: translateX(0.25rem);
}

.loading-spinner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid hsla(220, 30%, 8%, 0.3);
    border-top: 2px solid var(--primary-foreground);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Signup Link */
.signup-link {
    text-align: center;
    margin-top: 1.5rem;
}

.signup-link p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.create-account {
    color: var(--primary);
    background: none;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.create-account:hover {
    color: var(--primary-glow);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 2rem;
}

.footer p {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Toast Styles */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-card);
    animation: slideInRight 0.3s ease-out;
}

.toast-title {
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.toast-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Animations */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% { 
        transform: translateY(-10px) rotate(1deg); 
    }
    75% { 
        transform: translateY(-5px) rotate(-1deg); 
    }
}

@keyframes wave {
    0%, 100% { 
        background-position: 200% 0%; 
    }
    50% { 
        background-position: 0% 0%; 
    }
}

@keyframes liquidMove {
    0%, 100% { 
        transform: translate(0px, 0px) scale(1) rotate(0deg);
        border-radius: 50% 40% 60% 30%;
    }
    25% { 
        transform: translate(30px, -20px) scale(1.1) rotate(90deg);
        border-radius: 40% 60% 50% 70%;
    }
    50% { 
        transform: translate(-20px, 40px) scale(0.9) rotate(180deg);
        border-radius: 60% 30% 70% 40%;
    }
    75% { 
        transform: translate(-40px, -30px) scale(1.05) rotate(270deg);
        border-radius: 30% 70% 40% 60%;
    }
}

@keyframes liquidMove2 {
    0%, 100% { 
        transform: translate(0px, 0px) scale(1) rotate(0deg);
        border-radius: 60% 40% 30% 70%;
    }
    33% { 
        transform: translate(-40px, 30px) scale(1.15) rotate(120deg);
        border-radius: 40% 70% 60% 30%;
    }
    66% { 
        transform: translate(50px, -40px) scale(0.85) rotate(240deg);
        border-radius: 70% 30% 40% 60%;
    }
}

@keyframes liquidMove3 {
    0%, 100% { 
        transform: translate(0px, 0px) scale(1) rotate(0deg);
        border-radius: 40% 60% 70% 30%;
    }
    20% { 
        transform: translate(25px, 35px) scale(1.2) rotate(72deg);
        border-radius: 60% 30% 40% 70%;
    }
    40% { 
        transform: translate(-35px, -25px) scale(0.8) rotate(144deg);
        border-radius: 30% 70% 60% 40%;
    }
    60% { 
        transform: translate(45px, 15px) scale(1.1) rotate(216deg);
        border-radius: 70% 40% 30% 60%;
    }
    80% { 
        transform: translate(-15px, -45px) scale(0.9) rotate(288deg);
        border-radius: 50% 60% 40% 30%;
    }
}

@keyframes liquidMorph {
    0%, 100% { 
        border-radius: 50% 40% 60% 30%;
        transform: scale(1);
    }
    25% { 
        border-radius: 40% 70% 30% 60%;
        transform: scale(1.1);
    }
    50% { 
        border-radius: 70% 30% 50% 40%;
        transform: scale(0.9);
    }
    75% { 
        border-radius: 30% 60% 40% 70%;
        transform: scale(1.05);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

/* Fade In Up Animation */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.stagger-1 { 
    animation-delay: 0.1s; 
}

.stagger-2 { 
    animation-delay: 0.2s; 
}

.stagger-3 { 
    animation-delay: 0.3s; 
}

.stagger-4 { 
    animation-delay: 0.4s; 
}

/* Adicionado foco visível para botões */
button:focus {
    outline: 2px solid hsl(210, 100%, 55%);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 1.5rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .logo-container {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .logo-icon {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .login-card {
        padding: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .blob-1 {
        width: 16rem;
        height: 16rem;
    }
    
    .blob-2 {
        width: 14rem;
        height: 14rem;
    }
    
    .blob-3 {
        width: 12rem;
        height: 12rem;
    }
}

@media (max-width: 640px) {
    .login-container {
        padding: 0.75rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .title {
        font-size: 1.375rem;
    }
    
    .subtitle {
        font-size: 0.875rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .card-description {
        font-size: 0.8125rem;
    }
    
    .blob-1, .blob-2, .blob-3 {
        width: 10rem;
        height: 10rem;
    }
    
    .liquid-1, .liquid-2, .liquid-3, .liquid-4 {
        width: 6rem;
        height: 6rem;
    }
    
    .ocean-wave {
        height: 4rem;
    }
    
    .wave-1 {
        opacity: 0.15;
    }
    
    .wave-2 {
        opacity: 0.2;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 0.5rem;
    }
    
    .login-card {
        padding: 1.25rem;
    }
    
    .header {
        margin-bottom: 1.5rem;
    }
    
    .logo-container {
        width: 3rem;
        height: 3rem;
        margin-bottom: 0.75rem;
    }
    
    .logo-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .title {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .subtitle {
        font-size: 0.8125rem;
    }
    
    .card-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .card-description {
        font-size: 0.75rem;
    }
    
    .login-form {
        gap: 1.25rem;
    }
    
    .form-group {
        gap: 0.375rem;
    }
    
    .form-label {
        font-size: 0.8125rem;
    }
    
    input[type="email"],
    input[type="password"] {
        padding: 0.625rem 0.625rem 0.625rem 2.25rem;
        font-size: 0.875rem;
    }
    
    .input-icon {
        width: 1.125rem;
        height: 1.125rem;
        left: 0.625rem;
        top: 0.625rem;
    }
    
    .password-toggle {
        width: 1.5rem;
        height: 1.5rem;
        right: 0.5rem;
        top: 0.5rem;
        padding: 0.25rem;
    }
    
    .eye-icon {
        width: 1rem;
        height: 1rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .checkbox-container label {
        font-size: 0.8125rem;
    }
    
    .forgot-password {
        font-size: 0.8125rem;
        width: 100%;
        text-align: left;
    }
    
    .submit-btn {
        padding: 1.25rem;
        font-size: 0.9375rem;
    }
    
    .blob-1, .blob-2, .blob-3 {
        width: 8rem;
        height: 8rem;
    }
    
    .liquid-1 {
        width: 5rem;
        height: 5rem;
    }
    
    .liquid-2 {
        width: 4rem;
        height: 4rem;
    }
    
    .liquid-3 {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .liquid-4 {
        width: 4.5rem;
        height: 4.5rem;
    }
    
    .ocean-wave {
        height: 3rem;
    }
    
    .wave-1 {
        opacity: 0.1;
    }
    
    .wave-2 {
        opacity: 0.15;
    }
    
    .signup-link p {
        font-size: 0.8125rem;
    }
    
    .footer p {
        font-size: 0.6875rem;
    }
    
    .footer {
        margin-top: 1.5rem;
    }
    
    .login-content {
        max-width: 100%;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 0.375rem;
    }
    
    .login-card {
        padding: 1rem;
    }
    
    .title {
        font-size: 1.125rem;
    }
    
    .card-title {
        font-size: 0.9375rem;
    }
    
    .submit-btn {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    .login-form {
        gap: 1rem;
    }
}

/* Melhorias para orientação paisagem (landscape) em dispositivos móveis */
@media (max-height: 600px) and (orientation: landscape) {
    .login-container {
        padding: 0.5rem;
    }
    
    .header {
        margin-bottom: 1rem;
    }
    
    .logo-container {
        width: 2.5rem;
        height: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .logo-icon {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .title {
        font-size: 1.125rem;
        margin-bottom: 0.25rem;
    }
    
    .subtitle {
        font-size: 0.75rem;
    }
    
    .login-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .card-description {
        font-size: 0.75rem;
    }
    
    .login-form {
        gap: 0.75rem;
    }
    
    .form-group {
        gap: 0.25rem;
    }
    
    .form-label {
        font-size: 0.75rem;
    }
    
    input[type="email"],
    input[type="password"] {
        padding: 0.5rem 0.5rem 0.5rem 2rem;
        font-size: 0.875rem;
    }
    
    .input-icon {
        width: 1rem;
        height: 1rem;
        left: 0.5rem;
        top: 0.5rem;
    }
    
    .password-toggle {
        width: 1.5rem;
        height: 1.5rem;
        right: 0.5rem;
        top: 0.5rem;
        padding: 0.25rem;
    }
    
    .eye-icon {
        width: 1rem;
        height: 1rem;
    }
    
    .form-options {
        margin: 0.5rem 0;
    }
    
    .checkbox-container label {
        font-size: 0.75rem;
    }
    
    .forgot-password {
        font-size: 0.75rem;
    }
    
    .submit-btn {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .signup-link {
        margin-top: 0.75rem;
    }
    
    .signup-link p {
        font-size: 0.75rem;
    }
    
    .footer {
        margin-top: 0.75rem;
    }
    
    .footer p {
        font-size: 0.625rem;
    }
    
    .background-elements {
        opacity: 0.05;
    }
    
    .ocean-wave {
        height: 2rem;
    }
    
    .blob-1, .blob-2, .blob-3 {
        width: 6rem;
        height: 6rem;
    }
    
    .liquid-1, .liquid-2, .liquid-3, .liquid-4 {
        width: 3rem;
        height: 3rem;
    }
}

/* Ajustes para telas muito pequenas em altura */
@media (max-height: 500px) {
    .login-container {
        align-items: flex-start;
        padding: 0.5rem;
        padding-top: 0.25rem;
    }
    
    .header {
        margin-bottom: 0.5rem;
    }
    
    .title {
        font-size: 1rem;
    }
    
    .subtitle {
        font-size: 0.6875rem;
    }
    
    .login-card {
        padding: 0.75rem;
    }
    
    .card-title {
        font-size: 0.875rem;
    }
    
    .card-description {
        font-size: 0.6875rem;
    }
    
    .login-form {
        gap: 0.5rem;
    }
    
    .submit-btn {
        padding: 0.5rem;
        font-size: 0.8125rem;
    }
}

/* Suporte para zoom e texto maior */
@media (min-width: 320px) {
    .login-content {
        min-width: 280px;
    }
    
    input[type="email"],
    input[type="password"] {
        min-height: 44px;
    }
    
    .submit-btn {
        min-height: 44px;
    }
    
    .forgot-password,
    .create-account {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Password toggle já tem tamanho adequado em todos os breakpoints */
}