@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Rajdhani:wght@500;700&display=swap");

:root {
    --cyber-dark: #03070a;
    --cyber-black: #000000;
    --cyber-green: #00ff41;
    --cyber-blue: #00f3ff;
    --cyber-purple: #bc13fe;
    --glass-border: rgba(255, 255, 255, 0.08);
}

body.bg-cyber-dark {
    background-color: var(--cyber-dark);
    font-family: "Rajdhani", sans-serif;
    color: #e2e8f0;
}

.font-tech {
    font-family: "Chakra Petch", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.font-mono {
    font-family: "Courier New", Courier, monospace;
}

/* Helpers */
.text-cyber-green {
    color: var(--cyber-green) !important;
}
.text-cyber-blue {
    color: var(--cyber-blue) !important;
}
.text-cyber-purple {
    color: var(--cyber-purple) !important;
}
.text-gray-300 {
    color: #d1d5db;
}
.text-gray-400 {
    color: #9ca3af;
}
.text-gray-500 {
    color: #6b7280;
}

.bg-black-50 {
    background-color: rgba(0, 0, 0, 0.5);
}
.bg-glass-card {
    background-color: rgba(255, 255, 255, 0.02);
}
.bg-darker {
    background-color: #0b1016;
}

/* --- HEADER --- */
.hero-cyber {
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
}
.matrix-bg {
    position: absolute;
    inset: 0;
    background-image: url("../cybersecurity.jpeg"); /* تأكد من وضع صورة هنا */
    background-size: cover;
    background-position: center;
    filter: brightness(0.3) contrast(1.2);
    z-index: -2;
}
/* Grid Overlay */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    mask-image: radial-gradient(circle, black 30%, transparent 80%);
}

.text-shadow-glow {
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

/* Buttons Skewed */
.skew-btn {
    transform: skew(-15deg);
    border: 1px solid var(--cyber-green);
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}
.skew-btn span {
    display: block;
    transform: skew(15deg);
} /* fix text */

.btn-cyber-filled {
    background: var(--cyber-green);
    color: black;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}
.btn-cyber-filled:hover {
    background: #ccffdc;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.6);
    color: black;
}

.btn-cyber-outline {
    background: transparent;
    color: var(--cyber-green);
}
.btn-cyber-outline:hover {
    background: rgba(0, 255, 65, 0.1);
    color: white;
    border-color: white;
}
.btn-cyber-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* --- CARDS & LEVELS --- */
.cyber-card {
    background: rgba(15, 23, 36, 0.6);
    border: 1px solid var(--glass-border);
    position: relative;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}
.corner-decor {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border-top: 2px solid var(--cyber-green);
    border-left: 2px solid var(--cyber-green);
}
.border-blue {
    border-color: var(--cyber-blue);
}
.border-purple {
    border-color: var(--cyber-purple);
}

.cyber-card:hover {
    transform: translateY(-5px);
    background: rgba(20, 30, 45, 0.8);
}
.icon-float {
    transition: 0.3s;
}
.cyber-card:hover .icon-float {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px currentColor);
}

/* Level Cards (Row) */
.level-card {
    border: 1px solid var(--glass-border);
    transition: 0.3s;
    cursor: default;
}
.level-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.01);
}

.bg-cyber-green-dark {
    background: linear-gradient(135deg, #064016 0%, #000 100%);
    border-left: 4px solid var(--cyber-green);
}
.bg-cyber-blue-dark {
    background: linear-gradient(135deg, #063c40 0%, #000 100%);
    border-left: 4px solid var(--cyber-blue);
}
.bg-cyber-purple-dark {
    background: linear-gradient(135deg, #2d0640 0%, #000 100%);
    border-left: 4px solid var(--cyber-purple);
}

.btn-icon-only {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    font-size: 1.2rem;
}
.hover-fill-green:hover {
    background: var(--cyber-green);
    color: black !important;
    box-shadow: 0 0 15px var(--cyber-green);
}
.hover-fill-blue:hover {
    background: var(--cyber-blue);
    color: black !important;
    box-shadow: 0 0 15px var(--cyber-blue);
}
.hover-fill-purple:hover {
    background: var(--cyber-purple);
    color: white !important;
    box-shadow: 0 0 15px var(--cyber-purple);
}

/* --- LABS --- */
.lab-card {
    transition: 0.3s;
}
.lab-card:hover {
    border-color: var(--cyber-green);
}
.lab-img-wrapper {
    height: 160px;
    position: relative;
    background: #000;
    overflow: hidden;
}
.lab-img-wrapper img {
    object-fit: cover;
    height: 100%;
    transition: 0.5s;
    opacity: 0.6;
}
.lab-card:hover img {
    transform: scale(1.1);
    opacity: 0.4;
}

.lab-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyber-green);
    opacity: 0;
    transition: 0.3s;
}
.lab-card:hover .lab-overlay {
    opacity: 1;
    backdrop-filter: blur(2px);
}

/* Code Preview Box */
.code-bg-preview {
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 19px,
        #1a2733 20px
    );
    height: 100%;
    width: 100%;
    opacity: 0.8;
}

/* Badge Subtles */
.bg-cyber-blue-subtle {
    background: rgba(0, 243, 255, 0.15);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: #8afaff;
}
.bg-cyber-purple-subtle {
    background: rgba(188, 19, 254, 0.15);
    border: 1px solid rgba(188, 19, 254, 0.3);
    color: #e7aaff;
}
.bg-cyber-green-subtle {
    background: rgba(0, 255, 65, 0.15);
    border: 1px solid rgba(0, 255, 65, 0.3);
    color: #a3ffbd;
}

/* Responsive */
@media (max-width: 991px) {
    .level-card {
        flex-direction: column;
    }
    .level-card .col-md-3,
    .level-card .col-md-7,
    .level-card .col-md-2 {
        width: 100%;
        border: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 20px;
    }
}
/* Challenge Cards */
.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    background: rgba(0, 0, 0, 0.3);
}

.challenge-card {
    transition: transform 0.3s;
}
.challenge-card:hover {
    transform: translateY(-5px);
    background: #0f1724;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.score-pill {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    font-family: "Rajdhani", sans-serif;
    letter-spacing: 0.5px;
}
