/* ===== CSS Variables ===== */
:root {
    --primary-color: #FF0000;
    --primary-hover: #cc0000;
    --secondary-color: #0b4ade;
    --bg-color: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(20, 20, 20, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(255, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(255, 0, 0, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.3s ease;
    --font-family: 'Cairo', sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Snow Container ===== */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none !important;
    z-index: 1;
    overflow: hidden;
}

#snow-container * {
    pointer-events: none !important;
}

#snow-container svg {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8)) !important;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.4);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 15px 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(11, 74, 222, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: float 6s ease-in-out infinite;
}

.floating-card .card-icon {
    font-size: 1.5rem;
}

.floating-card .card-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.card-3 {
    bottom: 20%;
    left: 15%;
    animation-delay: 4s;
}

/* ===== Features Section ===== */
.features {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== Packages Section ===== */
.packages {
    padding: 100px 0;
}

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

.package-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.package-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.package-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.package-card.popular {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.package-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 5px 15px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.package-name {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.package-price {
    text-align: center;
    margin-bottom: 20px;
}

.package-price .amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
}

.package-price .currency {
    font-size: 1rem;
    color: var(--text-secondary);
}

.package-description {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.package-features {
    list-style: none;
    margin-bottom: 30px;
}

.package-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.package-features li:last-child {
    border-bottom: none;
}

.package-features li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: 700;
}

.package-btn {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
}

/* ===== About Section ===== */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px 30px;
    color: var(--text-primary);
    font-weight: 500;
    z-index: 1001;
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: #10b981;
}

.toast.error {
    border-color: var(--primary-color);
}

/* ===== Loading Spinner ===== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    grid-column: 1 / -1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    margin-top: 20px;
    color: var(--text-secondary);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* ===== Responsive ===== */

/* Large Tablets & Small Laptops */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-link:not(.cart-link):not(.btn-login) {
        display: none;
    }
    
    #user-nav .user-menu {
        display: none;
    }
    
    .hero {
        padding: 120px 20px 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .floating-card {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .stats {
        gap: 30px;
        flex-direction: column;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    .hero {
        padding: 100px 15px 40px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        padding: 0 10px;
    }
    
    .hero-buttons .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
    
    .package-card {
        padding: 25px 20px;
    }
    
    .package-name {
        font-size: 1.3rem;
    }
    
    .package-price {
        font-size: 2rem;
    }
    
    .package-features {
        font-size: 0.9rem;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .package-price {
        font-size: 1.75rem;
    }
}

/* ===== User Menu ===== */
.btn-login {
    background: var(--primary-color);
    padding: 8px 20px !important;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.btn-login:hover {
    background: var(--primary-hover);
}

.user-menu {
    position: relative;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.user-name:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 150px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 10px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
    backdrop-filter: blur(20px);
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a,
.user-dropdown button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    text-align: right;
    background: transparent;
    border: none;
    font-family: var(--font-family);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
}

/* ===== Made With Love ===== */
.made-with-love {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    opacity: 0.7;
    transition: var(--transition);
}

.made-with-love:hover {
    opacity: 1;
    color: var(--primary-color);
}
