*,
::after,
::before {
    box-sizing: border-box;
    scrollbar-width: none;
}

html, body { overflow-x: hidden; }

/* Ocultar elementos hasta que se aplique la animación */
.titulo, .main-row, .about, .ordenador, .projects, .contact,
.project-container, .esquil, .cont, .proye {
    opacity: 0;
}

/* Ocultar elementos hasta que se aplique la animación */
.titulo, .main-row, .about, .ordenador, .projects, .contact,
.project-container, .esquil, .cont, .proye {
    opacity: 0;
}

body {
    background-color: #212121;
    color: #fff;
    font-family: monospace, serif;
    letter-spacing: 0.05em;
    padding: 0.5% 0.5% 0 0.5%;
}

.main-row {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

h1 {
    font-size: 23px;
    cursor: default;
}

.form {
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.form .control {
    margin: 0;
    width: 220px;
    max-width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
}

.form .control input {
    width: 100%;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: monospace, serif;
    letter-spacing: 0.05em;
    font-size: 16px;
}

.form .control input:hover,
.form .control input:focus {
    outline: none;
    border: 0;
}

.form .btn {
    width: 220px;
    height: 50px;
    display: block;
    padding: 14px 16px;
    background: transparent;
    outline: none;
    border: 0;
    color: #fff;
    letter-spacing: 0.1em;
    font-weight: bold;
    font-family: monospace;
    font-size: 16px;
}

.form .btn:hover .bg-top,
.form .btn:hover .bg-right,
.form .btn:hover .bg {
    background: #ffffffcc;
}
.form .btn .bg-top,
.form .btn .bg-right,
.form .btn .bg {
    transition: all 0.5s ease;
}
.form .btn:hover .text{
    color:#212121;
}
.form .btn .text{
    transition: all 0.5s ease;
}
.form .btn{
    cursor: pointer;
}

.block-cube {
    position: relative;
    max-width: 100%;
    word-break: break-all;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

.block-cube .bg-top {
    position: absolute;
    height: 10px;
    background: #909090;
    bottom: 100%;
    left: 5px;
    right: -5px;
    transform: skew(-45deg, 0);
    margin: 0;
}

.block-cube .bg-top .bg-inner {
    bottom: 0;
}

.block-cube .bg {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: #909090;
}

.block-cube .bg-right {
    position: absolute;
    background: #909090;
    top: -5px;
    z-index: 0;
    bottom: 5px;
    width: 10px;
    left: 100%;
    transform: skew(0, -45deg);
}

.block-cube .bg-right .bg-inner {
    left: 0;
}

.block-cube .bg .bg-inner {
    transition: all 0.2s ease-in-out;
}

.block-cube .bg-inner {
    background: #212121;
    position: absolute;
    left: 2px;
    top: 2px;
    right: 2px;
    bottom: 2px;
}

.block-cube .text {
    position: relative;
    z-index: 2;
}

.block-cube.block-input input {
    position: relative;
    z-index: 2;
}

.block-cube.block-input input:focus~.bg-right .bg-inner,
.block-cube.block-input input:focus~.bg-top .bg-inner,
.block-cube.block-input input:focus~.bg-inner .bg-inner {
    top: 100%;
    background: #909090;
}

.block-cube.block-input .bg-top,
.block-cube.block-input .bg-right,
.block-cube.block-input .bg {
    background: #909090;
    transition: background 0.2s ease-in-out;
}

.block-cube.block-input .bg-right .bg-inner,
.block-cube.block-input .bg-top .bg-inner {
    transition: all 0.2s ease-in-out;
}

.block-cube.block-input:hover .bg-top,
.block-cube.block-input:hover .bg-right,
.block-cube.block-input:hover .bg,
.block-cube.block-input:focus .bg-top,
.block-cube.block-input:focus .bg-right,
.block-cube.block-input:focus .bg {
    background: #ffffffcc;
}

.block-cube.block-cube-hover:hover .bg .bg-inner,
.block-cube.block-cube-hover:focus .bg .bg-inner {
    top: 100%;
}

body::after {
    content: "TorBula";
    display: block;
    font-size: 0px;
    height: 0;
    overflow: hidden;
}

.titulo {
    padding: 0.8% 2%;
    cursor: default;
}

.all {
    display: flex;
    justify-content: space-around;
}

.left {
    width: 80%;
    padding: 1%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.right {
    width: 19%;
    padding: 1%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login {
    width: auto;
    min-width: 260px;
}

.about,
.skills {
    margin-bottom: 25px;
}

.about{
    cursor: default;
}

.about,
.projects {
    padding: 1%;
}

.skills,
.contact {
    padding: 2% 0% 4% 0%;
}

.titulo h1 {
    font-size: 3rem;
    margin-bottom: 0px;
    margin-top: 0px;

}

.titulo p {
    margin: 0 0 0 12px;
    font-size: 1.6rem;
    white-space: nowrap;
}

.about h1 {
    font-size: 1.4rem;
    margin: 0 0 12px 0;
}

.about p {
    font-size: 1rem;
}

.projects h1 {
    font-size: 1.4rem;
    margin-top: 0px;
    margin-bottom: 25px;
}

.skills {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
}

.skills h1 {
    font-size: 1.4rem;
}

.skills ul {
    list-style: none;
    padding: 0;
}

.skills .text {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    width: 90%;
}

.skill-item {
    width: 100%;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 0.9rem;
    color: white;
    cursor: default;
    text-align: center;
}

.email {
    font-size: 0.9rem;
    margin-top: 25px;
}

.block-cube.block-input .text {
    padding: 15px 20px;
    position: relative;
    z-index: 2;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
}

.desl .text {
    transition: color 0.3s ease;
    width: 100%;
}
.skill-item .text {
    transition: all 0.3s ease;
}
.skill-item:hover .text {
    transition: all 0.3s ease;
    color: #212121;
}

.email {
    transition: color 0.3s ease;
    width: 100%;
}

.skill:hover {
    color: #212121;
}

.email .text {
    text-decoration: none;
}

.project-gallery {
    min-height:250px !important;
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
}

.project-gallery::-webkit-scrollbar {
    height: 8px;
}

.project-gallery::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.project-gallery::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.project-gallery::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.project-card {
    width: 330px;
    height: 220px;
    position: relative;
    flex-shrink: 0;
}

.project-card .bg-inner {
    padding: 0;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.project-overlay {
    background-color: rgba(0, 0, 0, 0.7);
    color: rgb(255, 255, 255);
    width: 100%;
    text-align: center;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    font-weight: bold;
}

.project-card:hover .project-overlay {
    transform: translateY(0%);
}

.project-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    flex-shrink: 0;
}

.project-button {
    display: flex;
    justify-content: center;
    width: 330px;
}
.project-button a{
    cursor: pointer;
}
.project-button .skill-item {
    width: 100%;
    height: 30px;
    margin: 0;
}

.project-button .skill-item .text {
    font-size: 0.8rem;
    font-weight: bold;
}

.project-button a {
    text-decoration: none;
    color: inherit;
}

.contact .text {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact h1 {
    font-size: 1.4rem;
    margin-top: 0px;
    margin-bottom: 0px;
}

.up {
    display: flex;
}

.centrado {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 0 2%;
}

.skills h1 {
    margin: 8px 0 24px 0;
}

.skill-item.email,
.block-cube.email {
    height: auto;
    min-height: 40px;
    align-items: center;
}

.email .text {
    transition: color 0.3s ease;
    width: 100%;
}

.email:hover .text {
    color: #212121;
}

.about .text p {
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: #fff;
    }
}

/* Elementos preparados para animación - visibles pero fuera de posición */
.slide-in-top {
    opacity: 0;
    visibility: visible;
    transform: translateY(-180px);
    animation: slideInTop 1.6s forwards;
}

@keyframes slideInTop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    opacity: 0;
    visibility: visible;
    transform: translateX(-180px);
    animation: slideInLeft 1.6s forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    opacity: 0;
    visibility: visible;
    transform: translateX(180px);
    animation: slideInRight 1.6s forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-bottom {
    opacity: 0;
    visibility: visible;
    transform: translateY(180px);
    animation: slideInBottom 1.6s forwards;
}

@keyframes slideInBottom {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.no-scroll,
body.no-scroll .up,
body.no-scroll .todo,
body.no-scroll .all {
    overflow-x: hidden;
    overflow-y: hidden;
}

.movil {
    display: none !important;
}

.ordenador {
    display: block;
}

.oculto {
    opacity: 0;
    visibility: hidden;
}

.icon {
    width: 1.6rem;
    margin-right: 10px;
}

.cont {
    width: 90%;
    margin: 10px 0;
}

.cont .text {
    display: flex;
    flex-direction: row;
}

.icon {
    filter: invert(1);
    transition: all 0.3s ease;
}

.cont:hover .test,
.cont:hover .icon {
    color: #212121;
    filter: invert(0);
}

.test {
    transition: all 0.3s ease;
    font-size: 0.9rem !important;
}

a .test,
a {
    text-decoration: none;
}

.separador {
    width: 100%;
    text-align: center;
    ;
}

.margin {
    margin-bottom: 16px !important;
}

.juego1, .btn-idioma{
    display: flex;
    align-items: center;
}

.padj1{
    padding: 0 !important;
}
.padj2{
    padding: 0 !important;
}

.btn-juego, .boton-idioma{
    background: none;
    border:none;
    font-size: 1.4rem;
    line-height: 0.5;
    cursor: pointer;
}

.up-der{
    display: none;
}

.sup-der{
    display:flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    margin-right: 1.5%;
}

.separador{
    display: none;
}

.cont{
    width: 20% !important;
    max-width: 40px;
}

.pad {
    padding: 8px !important;
    align-items: center !important;
}

.contact-list{
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
}

.mac{
    padding: 8px 20px !important;
}

.none{
    display: unset !important;
}

.none .text{
    padding: 8px !important;
}

@media (max-width: 1400px) {
    .cont{
        width: 25% !important;
    }
}

/* Tema Claro */
.btn-theme {
    border: none;
    cursor: pointer;
}
.block-cube.block-input:hover .theme-icon {
    filter: invert(1);
}
.theme-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    filter:brightness(0);
    transition: all 0.3s ease;
    filter: invert(0) brightness(1) contrast(0) saturate(1);
}
body.white .block-cube.block-input:hover .theme-icon {
    filter: invert(0);
}
.light-mode-filter {
    filter: brightness(1) contrast(1) saturate(1);
}

.game-icon,
.language-icon {
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    filter: invert(0) brightness(1) contrast(0) saturate(1);
}

body.white .game-icon,
body.white .language-icon {
    filter: brightness(1) contrast(1) saturate(1);
}

.block-cube.block-input:hover .game-icon,
.block-cube.block-input:hover .language-icon {
    filter: invert(1);
}

body.white .block-cube.block-input:hover .game-icon,
body.white .block-cube.block-input:hover .language-icon {
    filter: invert(0);
}

body.white,
body.white .block-cube .bg-inner {
    background-color: #eee;
}

body.white,
body.white .block-cube.block-input .text,
body.white .form .btn {
    color: #212121;
}

body.white .block-cube.block-input .bg-top,
body.white .block-cube.block-input .bg-right,
body.white .block-cube.block-input .bg,
body.white .block-cube .bg-top,
body.white .block-cube .bg-right,
body.white .block-cube .bg {
    background: #212121;
}

body.white .carousel-nav{
    border: 2px solid #212121;
    color: #212121;
}
body.white .form .btn:hover .bg-top,
body.white .form .btn:hover .bg-right,
body.white .form .btn:hover .bg {
    background: #212121;
}
body.white .block-cube.block-input:hover .bg-top,
body.white .block-cube.block-input:hover .bg-right,
body.white .block-cube.block-input:hover .bg,
body.white .block-cube.block-input:focus .bg-top,
body.white .block-cube.block-input:focus .bg-right,
body.white .block-cube.block-input:focus .bg {
    background: #212121;
}

body.white .block-cube.block-cube-hover:hover .bg .bg-inner,
body.white .block-cube.block-cube-hover:focus .bg .bg-inner {
    top: 100%;
}

body.white .skill-item:hover .text {
    color: #eee;
}
body.white .icon {
    filter: invert(0);
}
body.white .cont:hover .test {
    color: #eee;
}


body.white .cont:hover .icon {
    color: #eee;
    filter: invert(1);
}

body.white .form .btn:hover .text {
    color: #eee;
}