:root {
    --primary: #38bdf8;
    --primary-dark: #0284c7;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --bg-dark: #020617;
    --card-bg: #1e293b;
    --nav-bg: rgba(15, 23, 42, 0.95);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ======================
   NAVBAR
   ====================== */
.navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.9;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.menu-toggle:hover {
    color: var(--primary);
}

/* ======================
   MAIN CONTENT
   ====================== */
main {
    margin-top: 80px;
    padding: 2rem 5%;
    min-height: calc(100vh - 400px);
}

/* ======================
   HERO SECTION
   ====================== */
.hero {
    text-align: center;
    padding: 5rem 0;
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.1) 0%, transparent 70%);
    border-radius: 30px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero h1 span {
    color: var(--primary);
    text-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

/* ======================
   BUTTONS
   ====================== */
.btn-main {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--secondary);
    padding: 0.8rem 2.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
}

.btn-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(56, 189, 248, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: translateY(-3px);
}

/* ======================
   GRID & CARDS
   ====================== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.custom-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.custom-card .icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.2rem;
}

.custom-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.custom-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.custom-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* ======================
   STATS SECTION
   ====================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
    text-align: center;
}

.stat-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-item h2 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.stat-item p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ======================
   SECTION TITLE
   ====================== */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 3px;
}

/* ======================
   TOOLS LIST
   ====================== */
.tool-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.tool-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.2rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tool-item:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--primary);
    transform: translateX(-5px);
}

.tool-item i:first-child {
    color: var(--primary);
    font-size: 1.3rem;
}

.tool-item span {
    flex: 1;
    margin-right: 15px;
}

/* ======================
   ARTICLE DETAIL
   ====================== */
.article-detail {
    max-width: 900px;
    margin: auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.article-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.article-meta i {
    margin-left: 0.5rem;
}

.article-body h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--primary);
}

.article-body h3 {
    font-size: 1.4rem;
    margin: 1.8rem 0 1rem;
    color: var(--primary);
}

.article-body p {
    margin-bottom: 1.2rem;
    color: #cbd5e1;
    line-height: 1.8;
}

.article-body ul,
.article-body ol {
    margin: 1rem 0 1rem 2rem;
    color: #cbd5e1;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.code-box {
    background: #0a0a0a;
    color: #10b981;
    padding: 1.5rem;
    border-radius: 12px;
    font-family: 'Courier New', Courier, monospace;
    direction: ltr;
    text-align: left;
    margin: 1.5rem 0;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.download-btn {
    display: inline-block;
    margin: 10px 0;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: bold;
    transition: var(--transition);
}

.download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
}

/* ======================
   PRICING CARDS
   ====================== */
.price-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.price-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(56, 189, 248, 0.2);
}

.price-card .badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.price-card h2 {
    font-size: 2.5rem;
    margin: 1.5rem 0;
    color: var(--primary);
}

.price-card ul {
    list-style: none;
    text-align: right;
    margin: 2rem 0;
}

.price-card li {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.price-card li i {
    color: var(--primary);
    margin-left: 10px;
}

/* ======================
   SOCIAL LINKS
   ====================== */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: translateY(-3px);
}

/* ======================
   TOAST NOTIFICATION
   ====================== */
#toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--secondary);
    padding: 1rem 2rem;
    border-radius: 14px;
    font-weight: 800;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateX(200%);
    transition: var(--transition);
    z-index: 2000;
}

#toast.show {
    transform: translateX(0);
}

/* ======================
   BACK TO TOP BUTTON
   ====================== */
#backToTop {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--card-bg);
    color: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    cursor: pointer;
    display: none;
    z-index: 999;
    transition: var(--transition);
    font-size: 1.2rem;
}

#backToTop:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: translateY(-3px);
}

#backToTop.show {
    display: block;
}

/* ======================
   FOOTER
   ====================== */
.main-footer {
    background: var(--secondary);
    padding: 5rem 5% 2rem;
    margin-top: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: auto;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-info p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.footer-links h4,
.footer-support h4 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-links ul,
.footer-support ul {
    list-style: none;
}

.footer-links li,
.footer-support li {
    margin-bottom: 12px;
}

.footer-links a,
.footer-support a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-support a:hover {
    color: var(--primary);
    padding-right: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.logo-white {
    color: #ffffff;
    font-weight: 700;
}

.logo-blue {
    color: var(--primary);
    font-weight: 700;
}

/* ======================
   RESPONSIVE DESIGN
   ====================== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--secondary);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        gap: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-item h2 {
        font-size: 2rem;
    }
    
    .article-detail {
        padding: 1.5rem;
    }
    
    .article-body h2 {
        font-size: 1.5rem;
    }
    
    .article-body h3 {
        font-size: 1.2rem;
    }
    
    .price-card.featured {
        transform: scale(1);
    }
    
    .btn-main,
    .btn-outline {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    #toast {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(200%);
        text-align: center;
        white-space: nowrap;
    }
    
    #toast.show {
        transform: translateX(-50%) translateY(0);
    }
    
    #backToTop {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-list {
        grid-template-columns: 1fr;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ======================
   UTILITY CLASSES
   ====================== */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* ======================
   ANIMATIONS
   ====================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}