:root {
    /* Modern AI-inspired palette */
    --primary: #7c3aed;   /* vivid purple */
    --accent: #06b6d4;    /* neon cyan */
    --muted: #94a3b8;     /* soft muted text */
    --bg-1: #030417;      /* deep navy */
    --bg-2: #071032;      /* indigo deep */
    --card-start: rgba(255,255,255,0.02);
    --card-end: rgba(255,255,255,0.01);
}

body {
    background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    color: #e6eef8;
}

/* AI-style background effects: animated diagonal lines and soft gradient blobs */
body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* subtle moving diagonal lines */
body::before {
    background-image: repeating-linear-gradient(
        135deg,
        rgba(6,182,212,0.03) 0 1px,
        transparent 1px 40px
    );
    opacity: 0.9;
    transform: translateZ(0);
    animation: driftLines 18s linear infinite;
    mix-blend-mode: screen;
}

/* soft animated gradient blobs for depth */
body::after {
    background-image: radial-gradient( at 10% 20%, rgba(124,58,237,0.12) 0%, rgba(124,58,237,0.00) 25% ),
                      radial-gradient( at 80% 70%, rgba(6,182,212,0.10) 0%, rgba(6,182,212,0.00) 28% );
    opacity: 0.95;
    animation: blobs 28s ease-in-out infinite;
    mix-blend-mode: screen;
}

@keyframes driftLines {
    0% { background-position: 0 0; }
    100% { background-position: 800px 800px; }
}

@keyframes blobs {
    0% { transform: translateY(0) scale(1); opacity: 0.95; }
    50% { transform: translateY(-40px) scale(1.02); opacity: 0.9; }
    100% { transform: translateY(0) scale(1); opacity: 0.95; }
}

/* Ensure page content sits above the decorative layers
   NOTE: avoid creating a new stacking context here (no z-index/position)
   because that can trap Bootstrap modals inside the stacking context and
   cause the modal to appear behind the backdrop, making buttons unclickable. */


.glass-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-5px);
}

.nav-item {
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

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

/* Ensure the main hero title is plain white for better legibility */
.homepage-hero .display-4.gradient-text {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    color: #ffffff !important;
    text-shadow: 0 6px 18px rgba(2,6,23,0.55);
}

.download-btn {
    display: inline-flex; /* ensure inline flex display */
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border: none;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    color: #081029;
    text-decoration: none; /* remove underline */
    box-shadow: 0 6px 24px rgba(124,58,237,0.12), 0 2px 8px rgba(6,182,212,0.06);
}
.download-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 48px rgba(124,58,237,0.18), 0 6px 20px rgba(6,182,212,0.1);
}

.download-counter {
    color: #ffffff; /* Change this if you use a different theme color */
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.ip-display {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-family: monospace;
}

/* Extracted search bar style */
.search-bar {
    max-width: 500px;
    background: rgba(255, 255, 255, 0.1);  /* soft, translucent background */
    padding: 12px 20px;                   /* increased padding for a better feel */
    border-radius: 12px;                  /* rounded corners */
    border: 1px solid rgba(255, 255, 255, 0.2); /* subtle border */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);    /* gentle shadow for depth */
}

/* Style for the glass effect on search elements */
.bg-glass {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    backdrop-filter: blur(5px);
}

/* Update form-control with glass background */
.form-control.bg-glass {
    color: #000; /* Ensures input text is dark */
    background-color: rgba(255, 255, 255, 0.8); /* Light background */
    border: none;
    box-shadow: none;
}

/* Force search input text to be dark */
input.form-control.bg-glass {
    color: #000 !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
}

/* Ensure the placeholder text is visible */
.form-control.bg-glass::placeholder {
    color: #000;  /* Dark placeholder text */
    opacity: 0.7;
}

/* Style for the input group text if needed */
.input-group-text.bg-glass {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
}

footer .text-muted {
  color: #fff !important;
}

/* Enhanced MS Office 2024 for Mac Section Styles */
.office-mac-section {
    /* Modern dark glass card with neon accent */
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    color: #e6eef8;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(2,6,23,0.55);
    border: 1px solid rgba(124,58,237,0.08);
    transition: box-shadow 220ms var(--ease, cubic-bezier(.2,.9,.2,1)), transform 220ms var(--ease);
    margin-bottom: 2rem;
    padding: 1.6rem 1rem;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
.office-mac-section:not(:last-child) {
    margin-bottom: 2rem;
}
.office-mac-section:hover {
    box-shadow: 0 18px 56px rgba(124,58,237,0.12), 0 8px 30px rgba(6,182,212,0.06);
    transform: translateY(-6px) scale(1.01);
}
.office-mac-section .badge-version {
    /* Place badge at the top-right of the card */
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-block;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    color: #021123;
    font-weight: 800;
    font-size: 0.88rem;
    border-radius: 999px;
    padding: 0.28em 0.9em;
    box-shadow: 0 6px 18px rgba(6,182,212,0.12), 0 2px 6px rgba(124,58,237,0.06);
    letter-spacing: 0.02em;
    z-index: 10;
}

/* subtle entrance animation for cards */
.office-mac-section {
    opacity: 0;
    transform-origin: center;
    animation: fadeUp 700ms cubic-bezier(.2,.9,.2,1) forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px) scale(0.995); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* helper: make the title line a flex container so the badge can sit on the right */
.office-mac-section .title-row {
    display: flex;
    align-items: center;
    justify-content: center; /* center the title horizontally */
    gap: 12px;
    width: 100%;
}
.office-mac-section .download-btn {
    font-size: 1rem;
    border-radius: 12px;
    font-weight: 800;
    box-shadow: 0 8px 28px rgba(6,182,212,0.06);
    margin: 0.5rem 0.5rem 0 0;
    background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
    border: none;
    color: #ffffff;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 0 rgba(0,0,0,0.15);
}
.office-mac-section .download-btn:hover {
    opacity: 0.98;
    transform: translateY(-2px);
}
.office-mac-section .download-btn i {
    font-size: 1.1em;
}
.office-mac-section .download-counter {
    color: #374151;
    font-size: 1rem;
    font-family: monospace;
}
/* Small info box used for short notes inside cards */
.info-box {
    background: linear-gradient(90deg, rgba(124,58,237,0.06), rgba(6,182,212,0.03));
    border: 1px solid rgba(124,58,237,0.08);
    color: var(--muted);
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    display: block;
    width: 100%;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* stronger contrast for info-box text on dark background */
.info-box { color: #e6eef8; background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border: 1px solid rgba(255,255,255,0.03); }
.office-mac-section img {
    filter: none;
    /* Place the logo at the top of the card (above the title) */
    order: -1;
    display: block;
    margin: 0 auto 0.8rem auto;
    height: 48px; /* unified height for all card icons */
    width: auto;
}

/* Card icon helper (for images that had inline height) */
.card-icon {
    height: 48px;
}

/* OS chips for compact colored labels */
.os-chip {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    margin-right: 4px;
    display: inline-block;
}
.os-chip.sequoia { color: #4f8cff; }
.os-chip.sonora { color: #00b894; }
.os-chip.ventura { color: #fdcb6e; }
.os-chip.monterey { color: #e17055; }
.os-chip.bigsur { color: #a29bfe; }
.os-chip.catalina { color: #00cec9; }
.os-chip.mojave { color: #d63031; }
@media (max-width: 768px) {
    .office-mac-section {
        margin-bottom: 2.5rem;
        padding: 1.5rem 0.5rem;
    }
    .office-mac-section .download-btn {
        font-size: 1rem;
        padding: 0.5rem 1rem;
        width: 100%;
        justify-content: center;
    }
    .office-mac-section .d-flex.gap-3.mb-2,
    .office-mac-section .d-flex.gap-4.mt-2 {
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: stretch !important;
    }
    .office-mac-section img {
        height: 40px !important;
    }
}
@media (max-width: 480px) {
    .office-mac-section {
        margin-bottom: 1.5rem;
        padding: 1rem 0.2rem;
    }
    .office-mac-section h4 {
        font-size: 1.1rem;
    }
    .office-mac-section .badge-version {
        position: static;
        display: inline-block;
        margin-left: 6px;
    }
}
/* End Enhanced Section Styles */

/* End Responsive and Spacing Improvements */

/* Extra desktop spacing for modern sections */
@media (min-width: 992px) {
    .office-mac-section {
        height: 420px; /* fixed card height for desktop */
        padding: 1.8rem 1.2rem;
        margin-bottom: 3.5rem;
    }
    .office-mac-section:not(:last-child) {
        margin-bottom: 3.5rem;
    }
    .office-mac-section .title-row {
        align-items: flex-start;
        justify-content: center; /* keep title centered on desktop */
    }
}

/* Homepage hero section styles */
.homepage-hero {
    background: linear-gradient(120deg, rgba(124,58,237,0.14) 0%, rgba(6,182,212,0.06) 100%);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(99,102,241,0.13), 0 1.5px 8px rgba(0,0,0,0.10);
    margin-bottom: 3.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.homepage-hero img {
    filter: drop-shadow(0 2px 8px #6366f1cc);
}
.homepage-hero .lead {
    color: #e0e7ff !important;
}
@media (max-width: 768px) {
    .homepage-hero {
    border-radius: 18px;
    padding: 2.5rem 0.75rem !important;
    }
}
@media (max-width: 480px) {
    .homepage-hero {
        border-radius: 10px;
        padding: 1.2rem 0.2rem !important;
    }
}
/* End homepage hero section styles */

/* Footer styles */
.site-footer {
    background: linear-gradient(180deg, rgba(2,6,23,0.6), rgba(7,16,50,0.55));
    border-top: 1px solid rgba(255,255,255,0.03);
    color: rgba(230,238,248,0.95);
    padding-bottom: 2.5rem;
}
.site-footer h5 { color: #fff; }
.site-footer h6 { color: #dbeafe; }
.site-footer .footer-links a { color: rgba(230,238,248,0.9); }
.site-footer .footer-links a:hover { color: var(--accent); }
.site-footer .footer-subscribe input { min-width: 0; }
.site-footer .footer-subscribe .form-control { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.04); color: #fff; }
.site-footer .footer-subscribe .btn-primary { background: linear-gradient(90deg, var(--accent), var(--primary)); border: none; }
.site-footer .social-icons a { color: rgba(255,255,255,0.9); font-size: 1.05rem; }
.site-footer .ip-display { margin-top: 0.6rem; }

@media (max-width: 576px) {
    .site-footer { padding-top: 1.6rem; }
}

/* Footer copyright should be white */
.footer-copyright { color: #ffffff !important; }

/* Make the privacy policy "last updated" text white */
.last-updated { color: #ffffff !important; }

/* Documentation subtitle color */
.doc-subtitle { color: #ffffff !important; }

/* Footer telegram link style */
.footer-telegram a { color: #ffffff !important; font-weight: 600; }

.footer-telegram a i { margin-right: 8px; }

/* Responsive grid for download cards */
.row.g-4.justify-content-center {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
@media (min-width: 992px) {
    .row.g-4.justify-content-center > .col-lg-4 {
        margin-bottom: 0 !important;
    }
}
/* End responsive grid for download cards */

/* Make PowerShell modal instruction text black for better print/paste visibility */
#psPopBoxModal .modal-body,
#psSmallModal .modal-body {
    color: #000000 !important;
}

/* Ensure the copied message inside the modal also appears black and bold */
#psPopBoxModal .modal-body .copied-msg,
#psSmallModal .modal-body .copied-msg {
    color: #000000 !important;
    font-weight: 700;
}

/* Make the modal header/title black as well (PowerShell Instructions) */
#psPopBoxModal .modal-header .modal-title,
#psSmallModal .modal-header .modal-title {
    color: #000000 !important;
}

/* Make modal header text (labels) black for consistency */
#psPopBoxModal .modal-header,
#psSmallModal .modal-header {
    color: #000000 !important;
}