﻿/* SMART CV ASSISTANT - MAIN CONTAINER */
.smart-cv-ass {
    position: absolute;
    left: 50%;
    opacity: 0.65;
    bottom: 30px;
    transform: translate(-50%, -50%) scale(1);
    z-index: 50;
    width: 500px;
    height: 120px;
    padding:0px;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease, width 0.5s ease, height 0.5s ease, top 0.5s ease, bottom 0.5s ease;
}

    .smart-cv-ass.active {
        left: 50%;
        bottom: auto;
        /*transform: translate(-50%, -50%) scale(1.1);*/
        width: 80vw;
        height: 550px;
        /*opacity: 0.87;*/
        background-color: rgba(0, 0, 0, 0.3);
        /* Rimuovi l'opacità da qui */
        opacity: 1;
        animation: float 6s ease-in-out infinite;
    }

@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(-50%) rotateX(2deg);
    }

    50% {
        transform: translateX(-50%) translateY(-52%) rotateX(-2deg);
    }
}


/* SMART CV CONTENT */
.smart-cv-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding:20px;
}
/* Stile iniziale */
.smart-cv-label {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    width: 100%;
    display: flex; /* Utilizza flexbox per allineare gli elementi di fianco */
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 2s ease;
}

    .smart-cv-label #label-part1,
    .smart-cv-label #label-part2 {
        transition: all 2s ease;
    }

/* Stile in stato attivo */
.smart-cv-ass.active .smart-cv-label {
    flex-direction: column; /* Imposta la direzione della colonna per impilare gli elementi */
    letter-spacing: normal;
    font-size: 18px; /* dimensione font in stato attivo */
    transform: translateY(35px);
    transition: transform 2s ease, font-size 2s ease;
}
@keyframes letter-spacing-split {
    0% {
        letter-spacing: 0;
    }

    12.5% { /* circa il 37% della durata totale di 8s */
        letter-spacing: 3.7px;
    }

    70% {
        letter-spacing: 10px;
    }
    100% {
        letter-spacing: 13px;
    }
}
@keyframes letter-spacing-split-fast {
    0% {
        letter-spacing: 0;
    }

    50% { /* circa il 37% della durata totale di 8s */
        letter-spacing: 7px;
    }

    100% {
        letter-spacing: 10px;
    }
}

.smart-cv-ass.active .smart-cv-label #label-part1 {
    font-size: 16px;
    animation: letter-spacing-split-fast 1s ease-in-out forwards;
}

.smart-cv-ass.active .smart-cv-label #label-part2 {
    font-size: 27px;
    animation: letter-spacing-split 7s ease-in-out forwards;
    transform: translateY(5px);
    transition: transform 2s ease;
}
    /*.smart-cv-ass.active .smart-cv-label #label-part1 {
        font-size: 16px;*/ /* Font 14px + 2px = 16px */
    /*}

    .smart-cv-ass.active .smart-cv-label #label-part2 {
        font-size: 18px;*/ /* Font 16px + 2px = 18px */
    /*}*/
/*.smart-cv-label {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    width: 100%;
}

.smart-cv-ass.active .smart-cv-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(35px);
    font-size: 18px;
    text-align: center;
    transition: transform 1s ease, font-size 1s ease, letter-spacing 7s ease;
    letter-spacing: 10px;
}*/

/* INPUT WRAPPER */
.smart-cv-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
    position: relative;
}

.smart-cv-ass.active .smart-cv-input-wrapper {
    flex-direction: column;
    align-items: center;
}

/* IOS TEXTBOX - CORRETTA */
.ios-textbox {
    flex: 1;
    width: 100%;
    height: 40px !important;
    min-height: 40px;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    outline: none;
    resize: vertical;
    transition: transform 1.5s ease, width 1.5s ease, height 1.5s ease;
    overflow: hidden;
    z-index:1000;
    opacity:1;
}

    .ios-textbox:focus {
        border-color: rgba(255, 255, 255, 0.6);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(5px);
    }

/* FIX PER L'ALTEZZA */
.smart-cv-ass.active .ios-textbox {
    background-color: black;
    color: white;
    width: 90% !important;
    height: 120px !important;
    min-height: 120px !important;
    transform: translateY(80px);
    transition: transform 1.5s ease, width 1.5s ease, height 1.5s ease, min-height 1.5s ease, background-color 0.5s ease, color 0.5s ease;
}

/* ASK BUTTON */
.ask-button {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid white;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101;
    padding: 0;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

    .ask-button::before {
        content: "";
        display: block;
        width: 100%;
        height: 100%;
        background: url('/lightweb/images/buttons/cv-smart-ass.png') no-repeat center center;
        background-size: contain;
        filter: invert(1);
    }

    .ask-button:hover {
        background-color: rgba(0, 0, 0, 0.7);
        transform: scale(1.05);
    }

/* Regola modificata per l'animazione */
.smart-cv-ass.active .ask-button {
    position: absolute;
    left: 50%;
    /* Posizione iniziale del pulsante */
    /*top: calc(50% + 130px);*/
    top:220px;
    /* Posizione finale del pulsante, 100px più in basso */
    transform: translateX(-50%);
    /* Muove il pulsante di 100px verso il basso in 2 secondi */
    transition: top 2s ease, left 3s ease, transform 3s ease;
}

/* EXTRA TEXT */
.extra-text {
    background-color:transparent;
    position: absolute;
    bottom: 20px;
    left: 50%;
    height: 100px;
    color: lightblue;
    font-size: 12px;
    font-weight: 200;
    border-radius: 5px;
    opacity: 0;
    transform: translateX(-50%);
    text-align: center;
    padding: 10px;
    width: 0;
}

.smart-cv-ass.active .extra-text {
    opacity: 0.65;
    width: 70%;
    transition: opacity 3s ease, transform 3s ease;
}

/* CLOSE BUTTON */
.close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid white;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    transition: all 0.5s ease;
    opacity: 0;
}

    .close-btn:hover {
        background-color: rgba(255, 255, 255, 0.4);
    }

.smart-cv-ass.active .close-btn {
    opacity: 1;
}

/* OVERLAY */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
    z-index: 40;
}

/* TERMINAL */
@keyframes fadeTerminal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
.terminal {
    animation: fadeTerminal 2s ease forwards;
    width: 100%;
    height: 100%;
    z-index: 100;
    max-width: 100%;
    max-height: 100%;
    padding: 0;
}

.terminal-cont {
    position: absolute;
    top: 33px;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    height: 88%;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 0;
    border-radius:5px;
    display:none;
}


.smart-cv-terminal {
    margin-top: 48px;
    background-color: #001100;
    background-color: #012256;
    color: #33FF33;
    font-family: monospace;
    padding: 12px;
    border-radius: 8px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    min-height: 99.5%;
    min-width: 100%;
}


/*divider*/
.smart-cv-divider {
    width: 0;
    opacity: 0;
    border: none;
    border-top: 2px solid #fff;
    margin: 20px auto;
    transition: width 1s ease, opacity 1s ease;
    position:absolute;
    top:0px;
}

    .smart-cv-divider.active {
        width: 80%;
        opacity: 1;
        left: 50%;
        transform: translateX(-50%);
        top: 110px; /* 70px + 35px = 105px */
        transition: width 1s ease, opacity 1s ease, left 1s ease, transform 1s ease, top 2s ease;
    }


#terminal {
    white-space: pre-wrap; /* fa rispettare \n */
}

.extra-text {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.smart-cv-ass.show-extra .extra-text {
    opacity: 1;
}



/* SMART CV ASSISTANT - MAIN CONTAINER */


/* SMART CV CONTENT */
.smart-cv-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Aggiungi opacità qui per il resto del contenuto */
    opacity: 0.9;
}

/* SMART CV CONTENT - Stile in stato attivo */
.smart-cv-ass.active .smart-cv-content {
    opacity: 1; /* Aumenta l'opacità quando è attivo */
}

































/******table border*/
@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* Container principale del tablet */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}
.tablet-container.active {
    width: 600px;
    height: 400px;
    width:100%;
    height:100%;
    perspective: 1000px;
    /*animation: float 6s ease-in-out infinite;*/
}



.tablet-frame {
    position: absolute;
    left: 50%;
    bottom:30px;
}

/* Frame esterno del tablet */
.tablet-frame.active {
    position:absolute;
    top:400px;
    left:50%;
    background: linear-gradient(145deg, #2a2a3e, #1a1a2e);
    border-radius: 25px;
    padding:20px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3), 0 0 100px rgba(0, 255, 255, 0.1), inset 0 0 50px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

    /* Bordi luminosi */
    .tablet-frame.active::before {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background-size: 400% 400%;
        border-radius: 27px;
        z-index: -1;
        animation: gradientShift 3s ease infinite;
    }

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}







/* Schermo interno */
.screen-internal {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 255, 255, 0.1);


}

    /* Effetto ologramma sullo schermo */
    .screen-internal::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
        animation: hologram 4s linear infinite;

    }

@keyframes hologram {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}
















        /* Elementi decorativi */
.corner-light {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid #00ffff;
    opacity: 0.6;
    display:none;
    z-index:100;
}
    .corner-light.nactive {
        display:block;
    }

    .corner-light:nth-child(1) {
        top: 10px;
        left: 10px;
        border-right: none;
        border-bottom: none;
        border-radius: 10px 0 0 0;
        animation: cornerPulse 3s ease-in-out infinite;
    }

        .corner-light:nth-child(2) {
            top: 10px;
            right: 10px;
            border-left: none;
            border-bottom: none;
            border-radius: 0 10px 0 0;
            animation: cornerPulse 3s ease-in-out infinite 0.5s;
        }

        .corner-light:nth-child(3) {
            bottom: 10px;
            left: 10px;
            border-right: none;
            border-top: none;
            border-radius: 0 0 0 10px;
            animation: cornerPulse 3s ease-in-out infinite 1s;
        }

        .corner-light:nth-child(4) {
            bottom: 10px;
            right: 10px;
            border-left: none;
            border-top: none;
            border-radius: 0 0 10px 0;
            animation: cornerPulse 3s ease-in-out infinite 1.5s;
        }

        @keyframes cornerPulse {
            0%, 100% { opacity: 0.3; }
            50% { opacity: 1; }
        }

        /* Grid decorativo */
        .grid-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: 
                linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
            background-size: 20px 20px;
            opacity: 0.3;
            animation: gridMove 10s linear infinite;
        }

        @keyframes gridMove {
            0% { transform: translate(0, 0); }
            100% { transform: translate(20px, 20px); }
        }

        /* Pulsante power */
.power-button {
    position: absolute;
    bottom: -15px;
    left: 50%;
    width: 60px;
    height: 30px;
    /*background: linear-gradient(145deg, #333, #1a1a1a);*/
    background: linear-gradient(145deg, #333, #1635d5);
    border-radius: 15px;
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 10000;
}
        .power-button.nactive {
            opacity: 1;
        }

        .power-button:hover {
            box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
            transform: translateX(-50%) scale(1.1);
        }

        /* Responsive */
        @media (max-width: 768px) {
            .tablet-container {
                width: 90vw;
                height: 60vw;
                max-width: 500px;
                max-height: 333px;
            }
            
            .screen-title {
                font-size: 1.8rem;
            }
            
            .screen-subtitle {
                font-size: 1rem;
            }
        }

/* Animazione shake */
@keyframes shake {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-6px);
    }

    80% {
        transform: translateX(6px);
    }

    100% {
        transform: translateX(0);
    }
}

.shake {
    animation: shake 0.3s;
    border-color: red;
}







/* Textarea futuristica */
.textarea-container {
    width: 100%;
    position: relative;
    width:90%;
    margin-top:50px;
    display:none;
    z-index:100;

}

.futuristic-textarea {
    width: 100%;
    height: 150px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 15px;
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1), inset 0 0 20px rgba(0, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

    .futuristic-textarea::placeholder {
        color: rgba(0, 255, 255, 0.5);
        font-style: italic;
    }

    .futuristic-textarea:focus {
        border-color: #00ffff;
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.3), inset 0 0 30px rgba(0, 255, 255, 0.1);
        background: rgba(0, 0, 0, 0.8);
    }

    .futuristic-textarea:hover {
        border-color: rgba(0, 255, 255, 0.5);
        box-shadow: 0 0 25px rgba(0, 255, 255, 0.2), inset 0 0 25px rgba(0, 255, 255, 0.07);
    }

/* Effetto typing indicator */
.textarea-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.3), transparent);
    background-size: 200% 200%;
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    animation: textareaGlow 3s ease infinite;
}

.futuristic-textarea:focus + .textarea-container::before,
.textarea-container:hover::before {
    opacity: 1;
}

@keyframes textareaGlow {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .tablet-container {
        width: 90vw;
        height: 60vw;
        max-width: 500px;
        max-height: 333px;
    }

    .screen-title {
        font-size: 1.8rem;
    }

    .screen-subtitle {
        font-size: 1rem;
    }
}

.textarea-container.nactive{
    visibility:visible;
}

.ios-textbox.nactive {
    visibility: collapse;
}

