@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ==========================
   RESET
========================== */

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

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    width: 100%;

    font-family: 'Poppins', sans-serif;
    color: white;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(124, 58, 237, 0.45),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(79, 70, 229, 0.4),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #09051a 0%,
            #160b35 45%,
            #241052 100%
        );

    overflow-x: hidden;
}


/* ==========================
   LIGHT EFFECTS
========================== */

body::before,
body::after {
    content: "";
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: -100px;
    left: -100px;
    background: rgba(139, 92, 246, 0.35);
}

body::after {
    right: -100px;
    bottom: -100px;
    background: rgba(59, 130, 246, 0.3);
}


/* ==========================
   CONTAINER
========================== */

.container {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;
}


/* ==========================
   AUTH
========================== */

.auth-page {
    position: relative;
    z-index: 1;

    min-height: 100vh;
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;

    overflow-x: hidden;
}


/* ==========================
   CARD
========================== */

.card {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 450px;
    min-width: 0;

    padding: 45px 40px;

    text-align: center;

    color: white;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.14),
            rgba(255, 255, 255, 0.05)
        );

    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    border: 1px solid rgba(255, 255, 255, 0.18);

    border-radius: 28px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);

    overflow: hidden;
}


/* petit reflet sur la carte */

.card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.5),
        transparent
    );
}


/* ==========================
   TITRES
========================== */

.card h1 {
    font-size: 2.3rem;
    font-weight: 700;

    margin-bottom: 15px;

    background: linear-gradient(
        90deg,
        #ffffff,
        #c4b5fd
    );

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card p {
    color: rgba(255, 255, 255, 0.75);

    line-height: 1.6;

    margin-bottom: 25px;
}


/* ==========================
   FORM
========================== */

form {
    width: 100%;
    max-width: 100%;

    display: flex;
    flex-direction: column;

    gap: 18px;

    margin-top: 25px;
}

.input-group {
    width: 100%;
    min-width: 0;

    text-align: left;
}

.input-group label {
    display: block;

    margin-bottom: 8px;

    font-size: 14px;
    font-weight: 500;

    color: rgba(255, 255, 255, 0.9);
}


/* ==========================
   INPUTS
========================== */

input {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding: 16px 18px;

    border-radius: 14px;

    border: 1px solid rgba(255, 255, 255, 0.14);

    outline: none;

    background: rgba(0, 0, 0, 0.18);

    color: white;

    font-family: 'Poppins', sans-serif;
    font-size: 16px;

    transition:
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

input:hover {
    background: rgba(255, 255, 255, 0.07);
}

input:focus {
    background: rgba(124, 58, 237, 0.12);

    border-color: rgba(167, 139, 250, 0.8);

    box-shadow:
        0 0 0 4px rgba(124, 58, 237, 0.12),
        0 0 25px rgba(124, 58, 237, 0.15);

    transform: translateY(-1px);
}


/* ==========================
   FILE
========================== */

input[type="file"] {
    width: 100%;
    max-width: 100%;

    margin: 20px 0;

    padding: 12px;

    overflow: hidden;

    cursor: pointer;
}


/* ==========================
   BUTTONS
========================== */

button {
    position: relative;

    width: 100%;
    max-width: 100%;

    padding: 16px;

    border: none;
    border-radius: 50px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #ddd6fe
        );

    color: #5b21b6;

    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 600;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(124, 58, 237, 0.2);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        filter 0.3s ease;
}

button:hover {
    transform: translateY(-3px);

    filter: brightness(1.05);

    box-shadow:
        0 15px 35px rgba(124, 58, 237, 0.4);
}

button:active {
    transform: scale(0.97);
}


/* ==========================
   LINKS
========================== */

.card a {
    color: #c4b5fd;

    text-decoration: none;

    font-weight: 600;

    transition: color 0.3s ease;
}

.card a:hover {
    color: white;
    text-decoration: underline;
}


/* ==========================
   HOME BUTTONS
========================== */

.buttons {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 18px;
}

.btn {
    display: block;

    width: 100%;
    max-width: 100%;

    padding: 15px;

    border-radius: 50px;

    font-size: 17px;
    font-weight: 600;

    text-decoration: none;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.login {
    background:
        linear-gradient(
            135deg,
            #ffffff,
            #ddd6fe
        );

    color: #5b21b6 !important;

    box-shadow:
        0 10px 30px rgba(124, 58, 237, 0.2);
}

.register {
    border: 1px solid rgba(255, 255, 255, 0.35);

    background: rgba(255, 255, 255, 0.06);

    color: white !important;
}

.btn:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.25);
}


/* ==========================
   ERRORS
========================== */

.error {
    width: 100%;
    max-width: 100%;

    margin: 20px 0;

    padding: 15px;

    border-radius: 15px;

    background: rgba(239, 68, 68, 0.12);

    border: 1px solid rgba(248, 113, 113, 0.35);

    color: #fecaca;

    overflow-wrap: break-word;
    word-break: break-word;
}


/* ==========================
   DASHBOARD
========================== */

body:not(.auth-page) {
    display: flex;

    justify-content: center;
    align-items: flex-start;

    padding: 40px 20px;

    overflow-y: auto;
}

.dashboard {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 900px;

    min-width: 0;
}

.dashboard.card {
    max-width: 900px;
}


/* ==========================
   VIDEO LIST
========================== */

.video-list {
    width: 100%;

    margin-top: 30px;

    display: grid;

    gap: 20px;
}

.video-card {
    width: 100%;
    min-width: 0;

    padding: 20px;

    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.07);

    border:
        1px solid rgba(255, 255, 255, 0.12);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.15);

    transition:
        transform 0.3s ease,
        background 0.3s ease;
}

.video-card:hover {
    transform: translateY(-3px);

    background:
        rgba(255, 255, 255, 0.1);
}

.video-card video {
    display: block;

    width: 100%;
    max-width: 100%;
    max-height: 400px;

    border-radius: 15px;
}

.video-title {
    margin-top: 15px;

    font-weight: 600;

    overflow-wrap: break-word;
    word-break: break-word;
}

.counter {
    margin: 20px 0;

    color: rgba(255, 255, 255, 0.75);
}


/* ==========================
   UPLOAD
========================== */

.upload-box {
    width: 100%;
    max-width: 100%;

    margin-top: 35px;

    padding: 25px;

    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.06);

    border:
        1px solid rgba(255, 255, 255, 0.1);
}


/* ==========================
   LOGOUT
========================== */

.logout {
    display: inline-block;

    max-width: 100%;

    margin-top: 35px;

    padding: 14px 35px;

    border-radius: 50px;

    background:
        linear-gradient(
            135deg,
            #ef4444,
            #dc2626
        );

    color: white !important;

    text-decoration: none;

    font-weight: 600;

    box-shadow:
        0 10px 25px rgba(239, 68, 68, 0.2);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.logout:hover {
    background:
        linear-gradient(
            135deg,
            #f87171,
            #ef4444
        );

    transform: translateY(-3px);

    box-shadow:
        0 15px 30px rgba(239, 68, 68, 0.3);

    text-decoration: none;
}


/* ==========================
   TABLET
========================== */

@media (max-width: 768px) {

    .auth-page {
        padding: 15px;
    }

    .card {
        max-width: 500px;

        padding: 35px 30px;
    }

    .card h1 {
        font-size: 2rem;
    }

    body:not(.auth-page) {
        padding: 25px 15px;
    }
}


/* ==========================
   MOBILE
========================== */

@media (max-width: 600px) {

    .container {
        padding: 10px;
    }

    .auth-page {
        min-height: 100svh;

        padding: 15px 10px;

        align-items: center;
    }

    .card {
        width: 100%;
        max-width: 100%;

        padding: 30px 20px;

        border-radius: 22px;
    }

    .card h1 {
        font-size: 1.8rem;

        line-height: 1.3;
    }

    .card p {
        font-size: 14px;

        line-height: 1.5;
    }

    form {
        width: 100%;

        gap: 15px;
    }

    .input-group {
        width: 100%;
    }

    input {
        width: 100%;

        padding: 14px 16px;

        font-size: 16px;
    }

    button {
        width: 100%;

        padding: 14px;

        font-size: 16px;
    }

    .btn {
        width: 100%;

        padding: 14px;

        font-size: 16px;
    }

    .error {
        font-size: 14px;

        padding: 12px;
    }

    body:not(.auth-page) {
        padding: 20px 10px;
    }

    .dashboard.card {
        width: 100%;

        padding: 25px 15px;
    }

    .upload-box {
        padding: 20px 15px;
    }

    .video-card {
        padding: 15px;
    }

    .logout {
        width: 100%;

        text-align: center;
    }
}


/* ==========================
   PETITS TÉLÉPHONES
========================== */

@media (max-width: 380px) {

    .auth-page {
        padding: 10px 8px;
    }

    .card {
        padding: 25px 15px;

        border-radius: 18px;
    }

    .card h1 {
        font-size: 1.6rem;
    }

    input {
        padding: 13px 14px;
    }

    button {
        padding: 13px;
    }
}