:root {
    --bg-dark: #2A1A2A;        /* مستوحى من لون خلفية الشعار */
    --bg-light: #F9F7FA;       /* خلفية فاتحة للأقسام البديلة */
    --primary: #906085;        /* البنفسجي الفاتح من الشجرة */
    --primary-op: rgba(144, 96, 133, 0.2); 
    --secondary: #DBA514;      /* الأصفر الذهبي من MY TREE */
    --secondary-hover: #efb516;
    --text-light: #FFFFFF;     /* نص أبيض */
    --text-dark: #333333;      /* نص داكن */
    --gray: #888888;
    --card-bg: rgba(255, 255, 255, 0.05); /* زجاجي شفاف */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Device Detection Overlay */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.overlay.active {
    visibility: visible;
    opacity: 1;
}
.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--primary-op);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
.overlay p {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-light);
}

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

/* Navbar */
.navbar {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease, padding 0.3s ease;
}
.navbar.scrolled {
    background: rgba(42, 26, 42, 0.98);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    height: 60px; /* Adjust size based on logo */
    border-radius: 8px; /* Optional rounded borders */
    transition: transform 0.3s ease;
    object-fit: contain;
}
.logo img:hover {
    transform: scale(1.05);
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}
.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 0%; height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}
.nav-links a:hover {
    color: var(--secondary);
}
.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    background: radial-gradient(circle at top right, rgba(144, 96, 133, 0.4) 0%, var(--bg-dark) 60%);
}
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    position: relative;
    z-index: 2;
}
.hero-text {
    flex: 1;
    animation: slideInRight 1s ease;
}
.hero-text h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 15px;
    color: var(--text-light);
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.hero-text h1 span {
    color: var(--secondary);
}
.hero-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
}
.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #f1f1f1;
    max-width: 500px;
}
.hero-buttons {
    display: flex;
    gap: 20px;
}
.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    gap: 15px;
}
.btn i {
    font-size: 2rem;
}
.btn span {
    text-align: right;
    line-height: 1.2;
    font-size: 0.95rem;
}
.btn.google-play {
    background: #ffffff;
    color: #222;
}
.btn.google-play:hover {
    background: #e0e0e0;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.btn.app-store {
    background: var(--secondary);
    color: var(--bg-dark);
}
.btn.app-store:hover {
    background: var(--secondary-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(219, 165, 20, 0.4);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: fadeIn 1.5s ease;
}
.floating-phone {
    width: 320px;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    border: 8px solid #4a304b;
    animation: float 5s ease-in-out infinite;
}
.floating-phone img {
    width: 100%;
    display: block;
    height: auto;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-25px); }
    100% { transform: translateY(0px); }
}
@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Wave Shape Divider */
.wave-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    /*transform: rotate(180deg);*/
}
.wave-bottom svg {
    position: relative;
    display: block;
    width: calc(130% + 1.3px);
    height: 90px;
}
.wave-bottom .shape-fill {
    fill: var(--bg-light);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-header h2 {
    font-size: 2.8rem;
    color: var(--secondary);
    margin-bottom: 15px;
    font-weight: 900;
}
.section-header .line {
    width: 100px;
    height: 5px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 5px;
}

/* About Section */
.about {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 120px 0;
}
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.about-card {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-bottom: 4px solid transparent;
}
.about-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
    border-bottom: 4px solid var(--secondary);
}
.icon-box {
    width: 90px;
    height: 90px;
    background: rgba(219, 165, 20, 0.1);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    margin: 0 auto 25px;
    transition: all 0.4s ease;
}
.about-card:hover .icon-box {
    background: var(--secondary);
    color: #fff;
    transform: rotate(10deg) scale(1.1);
}
.about-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--bg-dark);
    font-weight: 800;
}
.about-card p {
    color: #555;
    font-size: 1.1rem;
}

/* Rewards Section */
.rewards {
    padding: 120px 0;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}
.rewards::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: var(--primary-op);
    border-radius: 50%;
    filter: blur(100px);
}
.rewards::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -100px;
    width: 300px; height: 300px;
    background: rgba(219, 165, 20, 0.1);
    border-radius: 50%;
    filter: blur(100px);
}
.rewards-content {
    display: flex;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.rewards-text {
    flex: 1;
}
.rewards-text h2 {
    font-size: 3rem;
    color: var(--secondary);
    font-weight: 900;
    margin-bottom: 10px;
}
.rewards-text h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 25px;
}
.rewards-text > p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #ddd;
}
.rewards-list {
    list-style: none;
}
.rewards-list li {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(10px);
}
.rewards-list li:hover {
    transform: translateX(-15px);
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
}
.list-icon {
    font-size: 2.2rem;
    color: var(--secondary);
    background: rgba(219, 165, 20, 0.15);
    width: 70px; height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    flex-shrink: 0;
}
.list-desc h4 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: #fff;
}
.list-desc p {
    color: #bbb;
    font-size: 1.05rem;
}

/* Installation Section */
.install {
    padding: 120px 0;
    background: var(--bg-light);
    color: var(--text-dark);
}
.install-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-top: 60px;
}
.step {
    text-align: center;
    position: relative;
    padding: 20px;
}
.step-number {
    position: absolute;
    top: 0; right: 50%;
    transform: translate(50%, -50%);
    width: 50px; height: 50px;
    background: var(--secondary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(219, 165, 20, 0.5);
    z-index: 2;
}
.step img {
    border-radius: 50%;
    width: 200px; height: 200px;
    object-fit: contain;
    margin-bottom: 25px;
    border: 6px solid #fff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: transform 0.4s ease;
    background: var(--bg-dark);
}
.step:hover img {
    transform: scale(1.08) rotate(5deg);
}
.step h3 {
    font-size: 1.6rem;
    color: var(--bg-dark);
    margin-bottom: 15px;
    font-weight: 800;
}
.step p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: #1A101A;
    padding: 60px 0 30px;
    text-align: center;
    border-top: 5px solid var(--primary);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 40px;
    margin-bottom: 30px;
}
.footer-logo h2 {
    color: var(--secondary);
    font-size: 2.5rem;
    font-weight: 900;
}
.footer-logo p {
    color: var(--primary);
    font-size: 1.1rem;
}
.footer-links {
    display: flex;
    gap: 20px;
}
.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    padding: 10px 20px;
    border-radius: 8px;
}
.footer-links a:hover {
    color: var(--secondary);
    background: rgba(255,255,255,0.1);
}
.copyright {
    color: #666;
    font-size: 1rem;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .container { width: 95%; }
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding-top: 50px;
    }
    .hero-text {
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    .hero-text h1 { font-size: 3.5rem; }
    .hero-image { margin-top: 50px; }
    .nav-links { display: none; } /* Could be replaced with a hamburger menu */
}

@media (max-width: 768px) {
    .hero-text h1 { font-size: 2.8rem; }
    .hero-text h2 { font-size: 1.4rem; }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    .btn { width: 100%; justify-content: center; }
    .rewards-content { flex-direction: column; }
    .footer-content { 
        flex-direction: column; 
        gap: 30px; 
    }
    .footer-links { flex-direction: column; width: 100%; }
    .footer-links a { justify-content: center; }
}
