/* Base Reset and Roots */
:root {
    --bg-color: #0b0c10;
    --primary-color: #66fcf1;
    --secondary-color: #45a29e;
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-ar);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Animated Geometric Shapes */
.geometric-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #151a2a 0%, #0b0c10 100%);
}

.shape {
    position: absolute;
    filter: blur(40px);
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.shape-circle {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #66fcf1, #45a29e);
    border-radius: 50%;
    top: -10%;
    left: -10%;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 200px solid transparent;
    border-right: 200px solid transparent;
    border-bottom: 350px solid rgba(255, 0, 150, 0.6);
    bottom: 5%;
    right: -5%;
    animation-duration: 25s;
    animation-direction: alternate-reverse;
}

.shape-polygon {
    width: 250px;
    height: 250px;
    background: linear-gradient(45deg, #7b2cbf, #c77dff);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    top: 40%;
    left: 20%;
    animation-duration: 30s;
}

.shape-blob {
    width: 400px;
    height: 400px;
    background: linear-gradient(180deg, rgba(10, 107, 255, 0.4), rgba(0, 255, 204, 0.4));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    bottom: -15%;
    left: 30%;
    animation: morph 15s ease-in-out infinite alternate;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-50px) rotate(45deg);
    }
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: rotate(0deg);
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(180deg);
    }
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

.header {
    text-align: center;
    z-index: 10;
    perspective: 1000px;
}

.logo {
    display: inline-block;
    font-family: var(--font-en);
    font-size: 7rem;
    font-weight: 900;
    letter-spacing: 6px;
    text-transform: lowercase;
    position: relative;
    background: linear-gradient(-45deg, #ffffff, #66fcf1, #c77dff, #45a29e, #ffffff);
    background-size: 300% 300%;
    animation: gradientText 6s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    transition: letter-spacing 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
    cursor: pointer;
    transform-style: preserve-3d;
}

.logo:hover {
    letter-spacing: 16px;
}

.logo::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    -webkit-text-fill-color: transparent;
    text-shadow: -4px 0px 10px rgba(102, 252, 241, 0.8), 4px 0px 10px rgba(199, 125, 255, 0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: -1;
}

.logo:hover::before {
    opacity: 1;
    transform: scale(1.05) translateZ(-10px);
}

.logo::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -2;
    filter: blur(20px);
    background: inherit;
    background-size: 300% 300%;
    animation: gradientText 6s ease infinite, pulseGlow 2s ease-in-out infinite alternate;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.7;
    transform: translateZ(-20px);
}

@keyframes gradientText {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulseGlow {
    from {
        filter: blur(15px);
        opacity: 0.6;
    }

    to {
        filter: blur(30px);
        opacity: 1;
    }
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: #a0aab2;
    letter-spacing: 1px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    width: 100%;
    z-index: 10;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.card:hover::before {
    left: 150%;
    transition: 0.7s;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(102, 252, 241, 0.2);
    border-color: rgba(102, 252, 241, 0.4);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.icon-shape {
    position: absolute;
    transition: all 0.5s ease;
}

.triangle-icon {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 52px solid #66fcf1;
    filter: drop-shadow(0 0 10px #66fcf1);
}

.square-icon {
    width: 50px;
    height: 50px;
    background-color: #c77dff;
    transform: rotate(45deg);
    filter: drop-shadow(0 0 10px #c77dff);
}

.circle-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: #ff0055;
    background: linear-gradient(135deg, #ff0055, #ffaa00);
    filter: drop-shadow(0 0 10px #ff0055);
}

.card:hover .triangle-icon {
    transform: rotate(360deg) scale(1.1);
}

.card:hover .square-icon {
    transform: rotate(135deg) scale(1.1);
    border-radius: 10px;
}

.card:hover .circle-icon {
    transform: scale(1.1);
}

.card-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #ffffff;
}

.card-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #b0bac3;
}

.card-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle closest-side, rgba(102, 252, 241, 0.15), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 9999;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
    pointer-events: none;
}

body.page-exiting .page-transition-overlay {
    transform: scaleY(1);
    transform-origin: bottom;
    pointer-events: all;
}

body.page-entering .page-transition-overlay {
    transform: scaleY(0);
    transform-origin: top;
    animation: slideUp 0.6s cubic-bezier(0.85, 0, 0.15, 1) forwards;
}

@keyframes slideUp {
    0% {
        transform: scaleY(1);
        transform-origin: top;
    }

    100% {
        transform: scaleY(0);
        transform-origin: top;
    }
}

.container {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.85, 0, 0.15, 1);
}

body.page-exiting .container {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
}

body.page-entering .container {
    animation: fadeUpIn 0.8s cubic-bezier(0.85, 0, 0.15, 1) forwards;
}

@keyframes fadeUpIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    transition: all 0.3s ease;
    background: rgba(102, 252, 241, 0.1);
}

.back-link:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: translateX(-10px);
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.5);
}

.diamond-icon {
    width: 40px;
    height: 40px;
    background-color: #00ffcc;
    transform: rotate(45deg);
    filter: drop-shadow(0 0 10px #00ffcc);
}

.card:hover .diamond-icon {
    transform: rotate(225deg) scale(1.1);
}

.hexagon-icon {
    width: 55px;
    height: 32px;
    background-color: #b0bac3;
    position: relative;
    filter: drop-shadow(0 0 10px #b0bac3);
}

.hexagon-icon::before,
.hexagon-icon::after {
    content: "";
    position: absolute;
    width: 0;
    left: 0;
    border-left: 27.5px solid transparent;
    border-right: 27.5px solid transparent;
}

.hexagon-icon::before {
    bottom: 100%;
    border-bottom: 16px solid #b0bac3;
}

.hexagon-icon::after {
    top: 100%;
    border-top: 16px solid #b0bac3;
}

.card:hover .hexagon-icon {
    transform: rotate(360deg) scale(1.1);
}

.cube-icon {
    width: 40px;
    height: 40px;
    background-color: #66fcf1;
    position: relative;
    transform: rotateX(45deg) rotateZ(45deg);
    transform-style: preserve-3d;
    filter: drop-shadow(0 0 10px rgba(102, 252, 241, 0.8));
}

.cube-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #45a29e;
    transform: rotateX(-90deg) translateY(-20px);
    transform-origin: top;
}

.cube-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #c77dff;
    transform: rotateY(90deg) translateX(20px);
    transform-origin: right;
}

.card:hover .cube-icon {
    animation: cubeSpin 2s infinite linear;
}

@keyframes cubeSpin {
    0% {
        transform: rotateX(45deg) rotateZ(45deg);
    }

    100% {
        transform: rotateX(45deg) rotateZ(405deg);
    }
}

.form-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.glass-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: right;
}

.form-group label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #66fcf1;
    margin-right: 10px;
}

.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    font-family: var(--font-ar);
    font-size: 1rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-control:focus {
    border-color: #66fcf1;
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.file-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(199, 125, 255, 0.15);
    border: 1px dashed #c77dff;
    color: #c77dff;
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-wrapper:hover .file-upload-btn {
    background: rgba(199, 125, 255, 0.3);
    box-shadow: 0 0 15px rgba(199, 125, 255, 0.4);
}

.submit-btn {
    margin-top: 1rem;
    padding: 1.2rem;
    font-family: var(--font-ar);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--bg-color);
    background: linear-gradient(135deg, #66fcf1, #45a29e);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 252, 241, 0.4);
}

.submit-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 252, 241, 0.6);
}

.research-icon {
    width: 40px;
    height: 40px;
    border: 4px solid #ffcc00;
    border-radius: 5px;
    position: relative;
    filter: drop-shadow(0 0 10px #ffcc00);
}

.research-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 20px;
    height: 20px;
    background-color: #ffcc00;
    border-radius: 50%;
}

.card:hover .research-icon {
    transform: scale(1.1) rotate(15deg);
}

.activity-icon {
    width: 45px;
    height: 45px;
    background: transparent;
    border-radius: 50%;
    border: 4px dashed #ff0055;
    filter: drop-shadow(0 0 10px #ff0055);
    animation: spinDash 6s infinite linear;
}

@keyframes spinDash {
    100% {
        transform: rotate(360deg);
    }
}

.card:hover .activity-icon {
    animation-duration: 2s;
    border-color: #ffaa00;
    filter: drop-shadow(0 0 15px #ffaa00);
}

@media (max-width: 768px) {
    .logo {
        font-size: 4rem;
    }

    .container {
        padding: 1rem;
        gap: 3rem;
    }
}