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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --gray-color: #666;
    --border-radius: 10px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.8) 80%,
        rgba(0, 0, 0, 1) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Video de fondo */
.video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.5;
}

.container {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.form-container {
    max-width: 500px;
    margin: 0 auto;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Encabezado */
.header {
    text-align: left;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-with-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    justify-content: center;
    width: 100%;
}

.header-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.logo-top {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 20px auto;
    object-fit: contain;
}

h1 {
    color: #ffffff;
    font-size: 4em;
    margin-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(
        90deg,
        #ffffff,
        #d3d3d3,
        #999999,
        #d3d3d3,
        #ffffff
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 8s ease-in-out infinite;
    text-align: left;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

h2 {
    color: #ffffff;
    font-size: 2em;
    margin-bottom: 10px;
    text-align: left;
}

.intro-text,
.subtitle {
    color: #ffffff;
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

.intro-text {
    font-size: 1.1em;
}

.intro-text-small {
    font-size: 0.85em !important;
    margin-bottom: 30px !important;
}

/* Logo Loop Carousel */
.logo-loop {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin: 50px calc(-50vw + 50%);
    overflow: hidden;
    position: relative;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-loop__track {
    display: flex;
    align-items: center;
    gap: 0;
    animation: logoScroll 120s linear infinite;
    padding: 20px 40px;
    will-change: transform;
}

.logo-loop__slide {
    flex: 0 0 auto;
    min-width: 200px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
}

.logo-loop__logo {
    height: 100%;
    width: auto;
    object-fit: contain;
    max-width: 150px;
}

@keyframes logoScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Botones */
.button-container {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-bottom: 40px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.btn {
    padding: 15px 40px;
    font-size: 1.1em;
    border: 2px solid #ffffff;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: none;
}

.btn-login {
    background: #ffffff;
    color: #000000;
}

.btn-login:hover {
    background: #e8e8e8;
    color: #000000;
    transform: none;
    box-shadow: none;
}

.btn-register {
    background: #ffffff;
    color: #000000;
}

.btn-register:hover {
    background: #e8e8e8;
    color: #000000;
    transform: none;
    box-shadow: none;
}

.btn-submit {
    background: #ffffff;
    color: #000000;
    width: 100%;
    padding: 12px;
    border: 2px solid #ffffff;
}

.btn-submit:hover {
    background: #e8e8e8;
}

.btn-back {
    background: #6c757d;
    color: white;
    margin-top: 20px;
    border: 2px solid #6c757d;
}

.btn-back:hover {
    background: #5a6268;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#loginForm,
#registerForm {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
    width: 100%;
    max-width: 35em;
    text-align: left;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ffffff;
    border-radius: 0;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: #1a1a1a;
    color: #ffffff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: none;
}

/* Nuevo estilo para inputs */
.input-wrapper input {
    background-color: #eee;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    width: 100%;
    max-width: 35em;
    border-radius: 1rem;
    color: #333;
    box-shadow: 0 0.4rem #dfd9d9;
    cursor: text;
    transition: all 0.3s ease;
}

.input-wrapper input::placeholder {
    color: #999;
}

.input-wrapper input:focus {
    outline: none;
    outline-color: lightcoral;
    transform: translateY(-0.2rem);
    box-shadow: 0 0.6rem #dfd9d9;
}

textarea {
    resize: vertical;
    min-height: 100px;
    background-color: #eee;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 1rem;
    color: #333;
    box-shadow: 0 0.4rem #dfd9d9;
    cursor: text;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    transform: translateY(-0.2rem);
    box-shadow: 0 0.6rem #dfd9d9;
}

/* Características */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
    width: 100%;
    justify-items: start;
}

.feature {
    padding: 20px;
    text-align: left;
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.feature-text {
    color: #ffffff;
    font-size: 0.95em;
    font-weight: 500;
}

/* Enlaces */
.link-section {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #ffffff;
}

.link-section p {
    color: #ffffff;
    margin-bottom: 10px;
}

.toggle-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.toggle-link:hover {
    text-decoration: underline;
}

/* Mensajes */
.error-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
}

.success-message {
    color: #28a745;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Botón Animado Moderno */
.animated-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 16px 36px;
    border: 4px solid;
    border-color: transparent;
    font-size: 16px;
    background-color: inherit;
    border-radius: 100px;
    font-weight: 600;
    color: white;
    box-shadow: 0 0 0 2px white;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.animated-button svg {
    position: absolute;
    width: 24px;
    fill: white;
    z-index: 9;
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.animated-button .arr-1 {
    right: 16px;
}

.animated-button .arr-2 {
    left: -25%;
}

.animated-button .circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.animated-button .text {
    position: relative;
    z-index: 1;
    transform: translateX(0);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.animated-button:hover {
    box-shadow: 0 0 0 12px transparent;
    color: black;
    border-radius: 12px;
}

.animated-button:hover .arr-1 {
    right: -25%;
}

.animated-button:hover .arr-2 {
    left: 16px;
}

.animated-button:hover .text {
    transform: translateX(12px);
}

.animated-button:hover svg {
    fill: #212121;
}

.animated-button:active {
    scale: 0.95;
    box-shadow: 0 0 0 4px white;
}

.animated-button:hover .circle {
    width: 220px;
    height: 220px;
    opacity: 1;
}

/* Botón dentro de formulario */
.form-group .animated-button {
    width: 100%;
    max-width: 35em;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 1rem;
    box-shadow: 0 0.4rem #dfd9d9;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-group .animated-button:hover {
    box-shadow: 0 0.6rem #dfd9d9;
}

.gsi-material-button {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-appearance: none;
    background-color: WHITE;
    background-image: none;
    border: 1px solid #747775;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #1f1f1f;
    cursor: pointer;
    font-family: 'Roboto', arial, sans-serif;
    font-size: 14px;
    height: 40px;
    letter-spacing: 0.25px;
    outline: none;
    overflow: hidden;
    padding: 0 12px;
    position: relative;
    text-align: center;
    -webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
    transition: background-color .218s, border-color .218s, box-shadow .218s;
    vertical-align: middle;
    white-space: nowrap;
    width: auto;
    max-width: 400px;
    min-width: min-content;
    margin: 20px auto;
    display: block;
}

.gsi-material-button .gsi-material-button-icon {
    height: 20px;
    margin-right: 10px;
    min-width: 20px;
    width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
    -webkit-align-items: center;
    align-items: center;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    height: 100%;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
    -webkit-flex-grow: 1;
    flex-grow: 1;
    font-family: 'Roboto', arial, sans-serif;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
    -webkit-transition: opacity .218s;
    transition: opacity .218s;
    bottom: 0;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.gsi-material-button:disabled {
    cursor: default;
    background-color: #ffffff61;
    border-color: #1f1f1f1f;
}

.gsi-material-button:disabled .gsi-material-button-contents {
    opacity: 38%;
}

.gsi-material-button:disabled .gsi-material-button-icon {
    opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state, 
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
    background-color: #303030;
    opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
    -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
    background-color: #303030;
    opacity: 8%;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }

    .btn {
        padding: 12px 30px;
        font-size: 1em;
    }

    .button-container {
        flex-direction: column;
    }

    .button-container .btn {
        width: 100%;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}
