/* هيدر صفحات أقسام برمجة الألعاب - مطابق لهيدر صفحة game-development.html */

.game-hero {
    --game-primary: #8b5cf6;
    --game-secondary: #06b6d4;
    --game-accent: #f97316;
    --primary-color: #6366f1;
}
/* Hero Section للألعاب */
.game-hero {
    min-height: 80vh;
    padding-top: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.game-hero .hero-title .title-sub {
    font-size: var(--font-size-xl);
    margin-top: 1rem;
}

/* Game Showcase */
.game-showcase {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.game-console {
    position: relative;
    animation: gameFloat 6s ease-in-out infinite;
}

.console-screen {
    width: 400px;
    height: 280px;
    background: #1a1a1a;
    border-radius: 20px;
    padding: 15px;
    box-shadow: var(--shadow-2xl);
    position: relative;
    border: 3px solid #333;
}

.game-interface {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: 2px solid #475569;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(139, 92, 246, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    font-weight: 600;
}

.game-title {
    color: #a78bfa;
    font-weight: 700;
}

.game-score {
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 5px;
}

.score-number {
    color: #fde047;
    font-weight: 800;
    animation: gamePulse 2s infinite;
}

.game-scene {
    position: relative;
    height: 150px;
    background: linear-gradient(180deg, #0369a1 0%, #075985 50%, #facc15 100%);
    overflow: hidden;
}

/* شخصية اللاعب */
.player-avatar {
    position: absolute;
    bottom: 20px;
    left: 50px;
    width: 25px;
    height: 35px;
    background: linear-gradient(45deg, #dc2626, #ef4444);
    border-radius: 50% 50% 20% 20%;
    animation: playerMove 3s ease-in-out infinite;
}

.player-avatar::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background: #fbbf24;
    border-radius: 50%;
    border: 2px solid #92400e;
}

/* الأعداء */
.enemies {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.enemy {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #7c2d12, #ea580c);
    border-radius: 20% 20% 50% 50%;
}

.enemy-1 {
    top: 40px;
    right: 80px;
    animation: enemyMove1 4s ease-in-out infinite;
}

.enemy-2 {
    top: 60px;
    right: 150px;
    animation: enemyMove2 3.5s ease-in-out infinite;
}

/* العناصر القابلة للجمع */
.power-ups {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.power-up {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: gameBounce 2s ease-in-out infinite;
}

.power-up.health {
    background: #dc2626;
    top: 80px;
    left: 120px;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.power-up.coin {
    background: #fbbf24;
    top: 100px;
    left: 200px;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* التضاريس */
.terrain {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
}

.sand-dune {
    position: absolute;
    bottom: 0;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    border-radius: 50% 50% 0 0;
}

.dune-1 {
    left: 20px;
    width: 60px;
    height: 25px;
}

.dune-2 {
    left: 120px;
    width: 80px;
    height: 35px;
}

.dune-3 {
    right: 40px;
    width: 50px;
    height: 20px;
}

/* واجهة اللعبة */
.game-ui {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.health-bar {
    width: 100px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.health-fill {
    width: 75%;
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 4px;
    animation: healthPulse 2s ease-in-out infinite;
}

.mini-map {
    width: 60px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-player {
    position: absolute;
    bottom: 5px;
    left: 8px;
    width: 4px;
    height: 4px;
    background: #22c55e;
    border-radius: 50%;
    animation: gamePulse 1s infinite;
}

.map-objectives {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.objective {
    width: 3px;
    height: 3px;
    background: #fbbf24;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

/* أزرار التحكم */
.console-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #2d3748;
    border-radius: 0 0 20px 20px;
    border-top: 2px solid #4a5568;
}

.d-pad {
    position: relative;
    width: 80px;
    height: 80px;
}

.d-pad button {
    position: absolute;
    width: 25px;
    height: 25px;
    background: linear-gradient(145deg, #4a5568, #2d3748);
    border: none;
    border-radius: 4px;
    color: #e2e8f0;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.d-pad button:hover {
    background: linear-gradient(145deg, #667eea, #764ba2);
    transform: translateY(-1px);
}

.btn-up {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.btn-down {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.btn-left {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.btn-right {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.action-buttons button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.btn-a {
    background: linear-gradient(145deg, #dc2626, #b91c1c);
    color: white;
}

.btn-b {
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
    color: white;
}

.action-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

/* العناصر العائمة */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.element-bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 5px;
    animation: bubbleFloat 4s ease-in-out infinite;
}

.element-bubble:nth-child(1) {
    top: -20px;
    left: 50px;
    animation-delay: 0s;
    color: var(--game-primary);
}

.element-bubble:nth-child(2) {
    top: 80px;
    right: -30px;
    animation-delay: 1s;
    color: var(--game-secondary);
}

.element-bubble:nth-child(3) {
    bottom: 60px;
    left: -40px;
    animation-delay: 2s;
    color: var(--game-accent);
}

.element-bubble:nth-child(4) {
    top: 150px;
    right: 20px;
    animation-delay: 3s;
    color: var(--primary-color);
}

/* الرسوم المتحركة */
@keyframes gameFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(-5px) rotate(-1deg); }
    75% { transform: translateY(-15px) rotate(1deg); }
}

@keyframes playerMove {
    0%, 100% { transform: translateX(0px); }
    25% { transform: translateX(10px); }
    50% { transform: translateX(20px); }
    75% { transform: translateX(5px); }
}

@keyframes enemyMove1 {
    0%, 100% { transform: translateX(0px) translateY(0px); }
    50% { transform: translateX(-30px) translateY(20px); }
}

@keyframes enemyMove2 {
    0%, 100% { transform: translateX(0px) translateY(0px); }
    50% { transform: translateX(-20px) translateY(-15px); }
}

@keyframes gameBounce {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

@keyframes gamePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes healthPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.6); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    .game-console {
        transform: scale(0.8);
    }

    .console-screen {
        width: 320px;
        height: 220px;
    }

    .console-controls {
        padding: 15px 20px;
    }

    .d-pad {
        width: 60px;
        height: 60px;
    }

    .d-pad button {
        width: 20px;
        height: 20px;
    }

    .action-buttons button {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .element-bubble {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .game-console {
        transform: scale(0.7);
    }

    .floating-elements {
        display: none;
    }
}