:root {
    --primary-bg: #0a0e17;
    --secondary-bg: #111827;
    --tertiary-bg: #1f2937;
    --card-bg: #1a1f2e;
    --accent-color: #6d28d9;
    --accent-hover: #7c3aed;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --border-color: #374151;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

header {
    background: linear-gradient(135deg, #1e1b4b 0%, #111827 50%, #1e1b4b 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    padding: 70px 20px;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjMWExZjJlIj48L3JlY3Q+CjxwYXRoIGQ9Ik0wIDVMNSAwWk02IDRMNCA2Wk0tMSAxTDEgLTFaIiBzdHJva2U9IiMyZDM3NGIiIHN0cm9rZS13aWR0aD0iMSI+PC9wYXRoPgo8L3N2Zz4=');
    opacity: 0.3; /* Increased opacity for more visibility */
    z-index: 0;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

header h1:hover {
    color: var(--accent-hover);
    transform: scale(1.05);
}

header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.btn-custom {
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-weight: 500;
}

.btn-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-custom:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(109, 40, 217, 0.4);
}

.btn-custom:hover::before {
    left: 100%;
}

section {
    padding: 80px 20px;
    position: relative;
    transition: all 0.5s ease;
}

/* Section separator - replacing diagonal dividers */
.section-separator {
    height: 10px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover), var(--accent-color));
    margin: 0;
    position: relative;
}

.bg-light-section {
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.bg-light-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCI+CjxyZWN0IHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgZmlsbD0idHJhbnNwYXJlbnQiPjwvcmVjdD4KPHBhdGggZD0iTTMwIDMwbDMwIDMwTTYwIDBMMzAgMzBNMCA2MEwzMCAzMCIgc3Ryb2tlPSIjMjQyZDQwIiBzdHJva2Utd2lkdGg9IjEiIG9wYWNpdHk9IjAuMiI+PC9wYXRoPgo8L3N2Zz4=');
    opacity: 0.15; /* Increased from 0.05 */
    z-index: 0;
}

.bg-dark-section {
    background: linear-gradient(135deg, #111827 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.bg-dark-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+CjxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0idHJhbnNwYXJlbnQiPjwvcmVjdD4KPGNpcmNsZSBjeD0iMTAiIGN5PSIxMCIgcj0iMSIgZmlsbD0iIzI0MmQ0MCIgb3BhY2l0eT0iMC4yIj48L2NpcmNsZT4KPC9zdmc+');
    opacity: 0.2; /* Increased from 0.1 */
    z-index: 0;
}

.section-content {
    position: relative;
    z-index: 1;
}

h2 {
    font-weight: 600;
    margin-bottom: 40px;
    position: relative;
    display: block;
    width: 100%;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

h2::after {
    content: '';
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
}

.features-row {
    margin-bottom: 40px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.4s ease;
    padding: 25px;
    margin: 15px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
    height: 100%;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 2;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
}

.card:hover::before {
    transform: scaleX(1);
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.1), rgba(124, 58, 237, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.card:hover .feature-icon-wrapper {
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.2), rgba(124, 58, 237, 0.2));
    /* Remove the rotateY transform */
}

.card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.card:hover i {
    color: var(--accent-hover);
}

.card h5 {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.card:hover h5 {
    color: var(--accent-hover);
}

.card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.screenshot-img {
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    max-width: 100%;
    height: auto;
    border: 2px solid var(--border-color);
}

.screenshot-img:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
    border-color: var(--accent-color);
}

pre code {
    background-color: #1a1f2e;
    padding: 20px;
    border-radius: 8px;
    display: block;
    overflow-x: auto;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.accordion-button {
    background-color: var(--tertiary-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    padding: 15px 20px;
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: var(--accent-color);
    color: #ffffff;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(109, 40, 217, 0.25);
    border-color: var(--accent-color);
}

.accordion-body {
    background-color: var(--card-bg);
    color: var(--text-primary);
    padding: 20px;
}

.accordion-item {
    width: 100%;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.list-group-item {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    animation: pulse 2s infinite;
}

#back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(109, 40, 217, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(109, 40, 217, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(109, 40, 217, 0);
    }
}

footer {
    background-color: var(--tertiary-bg);
    padding: 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjMWExZjJlIj48L3JlY3Q+CjxwYXRoIGQ9Ik0wIDVMNSAwWk02IDRMNCA2Wk0tMSAxTDEgLTFaIiBzdHJva2U9IiMyZDM3NGIiIHN0cm9rZS13aWR0aD0iMSI+PC9wYXRoPgo8L3N2Zz4=');
    opacity: 0.3; /* Increased opacity for more visibility */
    z-index: 0;
}

footer a {
    color: var(--accent-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

footer a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

footer a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-hover);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

footer a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

.image-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    transition: all 0.5s ease;
}

.image-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.image-overlay img {
    max-width: 85%;
    max-height: 85%;
    transition: all 0.5s ease;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    opacity: 0;
}

.image-overlay.active img {
    transform: scale(1);
    opacity: 1;
}

.image-overlay .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    transform: rotate(0deg);
}

.image-overlay .close-btn:hover {
    background: var(--accent-hover);
    transform: rotate(90deg);
}

.app-image {
    width: 200px;
    margin-bottom: 20px;
    transition: all 0.5s ease;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
}

.app-image:hover {
    transform: scale(1.1) rotate(5deg);
}

.notice-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.notice-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-color), var(--accent-hover));
}

.notice-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.notice-box h4 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.sf-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.glow-text {
    text-shadow: 0 0 10px rgba(109, 40, 217, 0.5);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    padding-top: 15px;
    display: block;
    text-align: center;
}

.section-divider {
    height: 10px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover), var(--accent-color));
    margin: 0;
    position: relative;
}

.section-divider-reverse {
    height: 10px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover), var(--accent-color));
    margin: 0;
    position: relative;
}

.highlight-box {
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 20px;
    background-color: rgba(109, 40, 217, 0.1);
    margin: 15px 0;
    position: relative;
    overflow: hidden;
    height: calc(100% - 30px); /* Make all boxes the same height */
}

.highlight-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(109, 40, 217, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.btn-group-custom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.text-accent {
    color: var(--accent-color);
}

.badge-custom {
    background-color: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.badge-custom:hover {
    background-color: var(--accent-hover);
    transform: scale(1.1);
}

/* Animated background */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.animated-bg span {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(109, 40, 217, 0.2); /* Increased opacity for more visibility */
    animation: animate 25s linear infinite;
    bottom: -150px;
    border-radius: 50%;
}

.animated-bg span:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.animated-bg span:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.animated-bg span:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.animated-bg span:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.animated-bg span:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.animated-bg span:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.animated-bg span:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.animated-bg span:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.animated-bg span:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.animated-bg span:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 50%;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

/* Usage section cards consistency */
.usage-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.usage-card h4 {
    margin-bottom: 15px;
}

.usage-card-content {
    flex-grow: 1;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    header p {
        font-size: 1rem;
    }

    .app-image {
        width: 150px;
    }

    .card {
        margin: 15px;
        padding: 20px;
    }

    .features-row {
        margin-bottom: 20px;
    }

    .screenshot-img {
        max-width: 90%;
    }

    section {
        padding: 60px 15px;
    }
}

@media (max-width: 576px) {
    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .app-image {
        width: 120px;
    }

    .btn-custom {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .card {
        margin: 10px;
        padding: 15px;
    }

    .features-row {
        margin-bottom: 15px;
    }

    .screenshot-img {
        max-width: 100%;
    }

    section {
        padding: 40px 10px;
    }
}

/* Contributors Section */
.contributors-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.contributor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contributor-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--accent-color);
}

.star-history-chart {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

/* Animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}