/* -------- BASE FUTURISTE -------- */
body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background: radial-gradient(circle at center, #0a0e23 0%, #1a103d 100%);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #e0e0e0;
    min-height: 100vh;
}

/* -------- TITRE CYBER -------- */
h1 {
    font-size: 3.2em;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(90deg, #00d1ff 0%, #ad00ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 12px rgba(106, 0, 255, 0.3);
    margin-bottom: 0.3em;
    letter-spacing: 0.5px;
    position: relative;
}

h1::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #00d1ff 0%, #ad00ff 100%);
    border-radius: 3px;
}

p {
    font-size: 1.2em;
    text-align: center;
    max-width: 600px;
    color: #b0b0b0;
    margin-bottom: 2em;
    line-height: 1.6;
}

/* -------- UPLOAD NEON -------- */
#photo-upload {
    display: block;
    padding: 18px;
    width: 100%;
    max-width: 450px;
    background: rgba(20, 25, 60, 0.5);
    border: 2px dashed #5a67d8;
    border-radius: 12px;
    font-size: 1.1em;
    color: #a3bffa;
    cursor: pointer;
    margin-bottom: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(90, 103, 216, 0.2);
}

#photo-upload:hover {
    border-color: #00f0ff;
    background: rgba(30, 35, 80, 0.7);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    transform: translateY(-2px);
}

/* -------- OPTIONS HUD -------- */
.frame-options {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.frame-option {
    width: 70px;
    height: 70px;
    border: 2px solid #4f46e5;
    background-color: rgba(30, 35, 80, 0.7);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.frame-option::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        transparent 45%,
        rgba(79, 70, 229, 0.3) 50%,
        transparent 55%
    );
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.frame-option:hover::before {
    animation: shine 1.5s infinite;
    opacity: 1;
}

@keyframes shine {
    0% { left: -50%; top: -50%; }
    100% { left: 150%; top: 150%; }
}

.frame-option.circle {
    border-radius: 50%;
}

.frame-option.rectangle {
    border-radius: 0;
}

.frame-option.rounded-square {
    border-radius: 15px;
}

.frame-option.active {
    border-color: #00f0ff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
    transform: scale(1.05);
}

/* -------- APERCU HOLO -------- */
.preview-container {
    background: rgba(20, 25, 60, 0.6);
    border: 1px solid rgba(90, 103, 216, 0.3);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(8px);
}

.preview-container::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, #5a67d8, #00f0ff);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

canvas {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* -------- CONTROLES TECH -------- */
.controls {
    text-align: center;
    margin-top: 20px;
}

#download-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #00f0ff 100%);
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

#download-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

#download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.6);
}

#download-btn:hover::before {
    left: 100%;
}

/* -------- RESPONSIVE -------- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.4em;
    }

    p {
        font-size: 1em;
    }

    .frame-option {
        width: 60px;
        height: 60px;
    }

    #photo-upload {
        padding: 16px;
        font-size: 1em;
    }

    #download-btn {
        padding: 14px 24px;
        font-size: 1em;
    }
}

/* -------- FOOTER CYBER -------- */
.simple-footer {
    margin-top: 80px;
    width: 100%;
    background: linear-gradient(90deg, #0a0e23 0%, #1a103d 100%);
    color: #b0b0b0;
    text-align: center;
    padding: 20px 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    position: relative;
    border-top: 1px solid rgba(90, 103, 216, 0.3);
}

.simple-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d1ff 0%, #ad00ff 100%);
}

.simple-footer .footer-link {
    color: #00f0ff;
    text-decoration: none;
    margin-left: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.simple-footer .footer-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #00f0ff;
    transition: width 0.3s ease;
}

.simple-footer .footer-link:hover {
    color: #fff;
}

.simple-footer .footer-link:hover::after {
    width: 100%;
}