﻿/* ====== Global Styles ====== */
html {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    color: #000;
    padding: 0;
}

/* ====== Animated Background ====== */
.bg {
    animation: slide 3s ease-in-out infinite alternate;
    background-image: linear-gradient(-60deg, #6c3 50%, #09f 50%);
    bottom: 0;
    left: -50%;
    opacity: .5;
    position: fixed;
    right: -50%;
    top: 0;
    z-index: -1;
}

.bg2 {
    animation-direction: alternate-reverse;
    animation-duration: 4s;
}

.bg3 {
    animation-duration: 5s;
}

@keyframes slide {
    0% {
        transform: translateX(-25%);
    }

    100% {
        transform: translateX(25%);
    }
}

/* ====== Container ====== */
.container {
    background-color: rgba(255, 255, 255, .8);
    border-radius: .25em;
    box-shadow: 0 0 .25em rgba(0,0,0,.25);
    box-sizing: border-box;
    padding: 20px;
    margin: 20px auto;
    max-width: 900px;
}

/* ====== Cards ====== */
.card {
    position: relative;
    width: 100%;
    min-height: 220px;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    margin-bottom: 20px;
    background: #ffffff; /* رجعنا الخلفية للون الأبيض */
    box-shadow: 20px 20px 60px #bebebe, -20px -20px 60px #ffffff;
    animation: fadeInUp 0.8s ease forwards;
    text-decoration: none;
    color: #000;
}

    /* Hover underline effect for cards */
    .card::after,
    .card::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 3px;
        background: linear-gradient(to right, #ff0000, #00ffff);
        left: 0;
        transform: scaleX(0);
        transition: transform 0.4s ease-out;
        z-index: 1; /* تحت النصوص */
    }

    .card::after {
        bottom: 0;
        transform-origin: right;
    }

    .card::before {
        top: 0;
        transform-origin: left;
    }

    .card:hover::after,
    .card:hover::before {
        transform: scaleX(1);
    }

/* Blob Animation */
.blob {
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #ff0000;
    opacity: 0.8;
    filter: blur(12px);
    animation: blob-bounce 5s infinite ease;
}

/* ====== Texts ====== */
.card h2,
.card p,
.created-date,
.card .btn {
    position: relative;
    z-index: 2;
    color: #000;
}

.card-title {
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.card-text {
    font-size: 1rem;
    margin-bottom: 8px;
}

.created-date {
    font-size: 0.9rem;
    color: #000;
}

/* ====== Buttons ====== */
.btn {
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-right: 8px;
    position: relative;
    z-index: 2;
}

    .btn:hover {
        transform: scale(1.05);
        filter: brightness(1.1);
    }

.btn-generate-link {
    background: linear-gradient(135deg, #3498db, #2c80b4);
    color: #fff;
    border: none;
}

    .btn-generate-link:hover {
        background: linear-gradient(135deg, #2c80b4, #1a5a85);
    }

.btn-view-results {
    background: linear-gradient(135deg, #27ae60, #1f8a4d);
    color: #fff;
    border: none;
}

    .btn-view-results:hover {
        background: linear-gradient(135deg, #1f8a4d, #145c32);
    }

.btn-questions {
    background: linear-gradient(135deg, #7a7a7a, #5a6268);
    color: #fff;
    border: none;
}

    .btn-questions:hover {
        background: linear-gradient(135deg, #5a6268, #3d3d3d);
    }

/* ====== Animations ====== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blob-bounce {
    0% {
        transform: translate(-100%, -100%) translate3d(0, 0, 0);
    }

    25% {
        transform: translate(-100%, -100%) translate3d(100%, 0, 0);
    }

    50% {
        transform: translate(-100%, -100%) translate3d(100%, 100%, 0);
    }

    75% {
        transform: translate(-100%, -100%) translate3d(0, 100%, 0);
    }

    100% {
        transform: translate(-100%, -100%) translate3d(0, 0, 0);
    }
}

/* ====== Grid ====== */
.survey-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 25px;
}



/* ====== Neon Flicker Animation for Navbar ====== */
.navbar .nav-link {
    text-decoration: none;
    position: relative;
    transition: all 0.5s ease;
    color: #000; /* اللون الأساسي */
}

    .navbar .nav-link::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        visibility: hidden;
        clip: rect(0, 0, 0, 0);
        transition: all 0.5s ease;
    }

    .navbar .nav-link:hover {
        color: #00ff00; /* اللون الأخضر عند hover */
        animation: neonFlicker 1.5s infinite alternate;
    }

        .navbar .nav-link:hover::before {
            visibility: visible;
            clip: rect(0, 900px, 0, 0);
            animation: neonFlicker 1.5s infinite alternate;
        }

/* ====== Neon Flicker Keyframes ====== */
@keyframes neonFlicker {
    0%, 100% {
        text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00, 0 0 15px #ff00ff, 0 0 20px #ff00ff, 0 0 25px #ff00ff, 0 0 30px #ff00ff, 0 0 35px #ff00ff;
    }

    50% {
        text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00, 0 0 15px #ff00ff, 0 0 20px #ff00ff, 0 0 25px #ff00ff, 0 0 30px #ff00ff, 0 0 35px #ff00ff, 0 0 40px #ff00ff, 0 0 50px #ff00ff, 0 0 75px #ff00ff;
    }
}






/* Search bar */
.search-bar {
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 8px 12px;
    width: 250px;
    transition: all 0.3s ease;
}

    .search-bar:focus {
        border-color: #2c80b4;
        box-shadow: 0 0 8px rgba(52, 152, 219, 0.5);
        outline: none;
    }

/* Reset button */
.btn-reset {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

    .btn-reset:hover {
        background: linear-gradient(135deg, #c0392b, #96281b);
        transform: scale(1.05);
    }

/* Sort dropdowns */
.sort-select {
    border: 2px solid #27ae60;
    border-radius: 8px;
    padding: 6px 10px;
    margin-left: 10px;
    transition: all 0.3s ease;
}

    .sort-select:focus {
        border-color: #1f8a4d;
        box-shadow: 0 0 8px rgba(39, 174, 96, 0.5);
        outline: none;
    }
