/* الألوان والخطوط الأساسية */
:root {
    --bg-color: #0d0a0b; /* أسود فاخر مائل للبني */
    --gold: #dfb15b; /* ذهبي مطفي كلاسيكي */
    --neon-glow: #e65c00; /* توهج برتقالي دافئ مستوحى من سترينجر ثينقز */
    --text-color: #f3eff0;
    --card-bg: #1a1516;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Cairo', sans-serif;
    overflow-x: hidden;
}

/* تأثير حبيبات الفيلم القديم (Film Grain Effect) */
.film-grain {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://cssanimation.rocks/images/random/grain.png');
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

/* الهيدر */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 8%;
    background: linear-gradient(to bottom, rgba(13,10,11,0.9), transparent);
    position: absolute;
    width: 100%;
    z-index: 100;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 2px;
}

.logo span {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(223, 177, 91, 0.3);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-right: 30px;
    font-size: 16px;
    transition: 0.4s ease;
    opacity: 0.7;
}

nav a:hover, nav a.active {
    opacity: 1;
    color: var(--gold);
    text-shadow: 0 0 8px var(--gold);
}

/* القسم الرئيسي (البانر) */
.hero-section {
    height: 85vh;
    background-image: url('https://images.unsplash.com/photo-1478720568477-152d9b164e26?q=80&w=1500&auto=format&fit=crop'); /* خلفية سينمائية دافئة */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 8%;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, var(--bg-color), rgba(13,10,11,0.4), var(--bg-color));
}

.hero-content {
    position: relative;
    max-width: 600px;
    z-index: 2;
    animation: fadeIn 1.5s ease-out;
}

.vintage-badge {
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 5px 15px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
    border-radius: 2px;
}

.hero-content h1 {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-content p {
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 30px;
}

.hero-buttons .btn-watch {
    background: var(--gold);
    color: var(--bg-color);
    padding: 12px 35px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 3px;
    margin-left: 15px;
    box-shadow: 0 4px 15px rgba(223, 177, 91, 0.4);
    transition: 0.4s ease;
}

.hero-buttons .btn-watch:hover {
    background: #fff;
    box-shadow: 0 4px 25px rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
}

.hero-buttons .btn-info {
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 12px 35px;
    text-decoration: none;
    border-radius: 3px;
    transition: 0.4s ease;
}

.hero-buttons .btn-info:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

/* قسم الأفلام والكرات الأنيقة */
.movies-section {
    padding: 60px 8%;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 26px;
    color: var(--gold);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px; right: 0;
    width: 50px; height: 2px;
    background-color: var(--gold);
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

/* أنميشن قلب الكرت الفخم (3D Flip Effect) */
.movie-card {
    background-color: transparent;
    height: 420px;
    perspective: 1000px; /* ليعطي عمق 3D للأنميشن */
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.movie-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card-front {
    background-color: #bbb;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%) sepia(10%); /* فلتر كلاسيكي خفيف */
    transition: 0.5s;
}

.movie-card:hover .card-front img {
    filter: grayscale(0%) sepia(0%);
}

.card-badge {
    position: absolute;
    top: 15px; left: 15px;
    background: rgba(13, 10, 11, 0.85);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 3px;
}

/* الجهة الخلفية للكرت عند الدوران */
.card-back {
    background: linear-gradient(135deg, #1a1516 0%, #2a1f21 100%);
    border: 2px solid rgba(223, 177, 91, 0.3);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

/* توهج كلاسيكي دافئ عند فتح الكرت */
.movie-card:hover .card-back {
    box-shadow: 0 0 25px rgba(230, 92, 0, 0.2);
    border-color: var(--neon-glow);
}

.card-back h3 {
    font-size: 22px;
    color: var(--gold);
    margin-bottom: 15px;
}

.card-back p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 20px;
}

.rating {
    display: block;
    margin-bottom: 25px;
    font-weight: bold;
    color: #ffcc00;
}

.btn-play {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 25px;
    text-decoration: none;
    border-radius: 20px;
    transition: 0.4s;
}

.btn-play:hover {
    background: var(--gold);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--gold);
}

/* أنميشن دخول الصفحة الرئيسي */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
