:root {
    --primary-color: #000;
    --text-color: #fff;
    --accent-color: #333;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #111111;
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Full page gradient background */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300vw;
    height: 300vh;
    background: linear-gradient(
        90deg,
        rgba(17, 17, 17, 0) 0%,
        rgba(15, 17, 34, 0.75) 20%,
        rgba(22, 15, 36, 0.75) 50%,
        rgba(15, 17, 34, 0.75) 80%,
        rgba(17, 17, 17, 0) 100%
    );
    z-index: -1;
    transform-origin: center center;
}

/* Update Navigation Styles */
.header {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    box-sizing: border-box;
    background-color: transparent;
    backdrop-filter: none;
    position: relative; /* Add this to ensure the ::after line positions correctly */
}

/* Adjust the header line style */
.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1035px;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(17, 17, 17, 1) 0%,
        transparent 15%,
        #4f46e5 35%,
        #a855f7 50%,
        #4f46e5 65%,
        transparent 85%,
        rgba(17, 17, 17, 1) 100%
    );
    opacity: 0.8;
    animation: gradient-wave 8s linear infinite;
    background-size: 200% 100%;
}

/* Remove the line from header-container */
.header-container::after {
    display: none;
}

/* Animation for the gradient line */
@keyframes gradient-line {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Standardize container widths */
.header-container {
    width: 100%;
    max-width: 1035px;
    display: flex;
    justify-content: center;
    position: relative;
}

/* Update navbar to use percentage-based layout */
.navbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 0 auto;
}

/* Position nav sections */
.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: -15%;
    padding: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 30px;
    margin-right: 0%;  /* Changed from -10% to 5% to move it left */
}

/* Update nav-link to remove extra spacing */
.nav-link {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
    font-size: 0.95rem;
    padding: 0;  /* Remove padding */
    margin: 0;   /* Remove margin */
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    opacity: 1;
}

/* Update nav-button styles */
.nav-button {
    background-color: rgba(255, 255, 255, 0.8);
    color: #121212;
    padding: 0.35rem 0.9rem;   /* Reduced padding for slimmer look */
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    height: 30px;              /* Reduced height */
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);  /* Subtle shadow on hover */
}

/* Update title section container */
.index-page-title-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 10vh;  /* Reduced from 15vh to 5vh */
    padding-bottom: 0;
    margin-bottom: 0;
    width: 100%;
}

.container {
    position: relative;
    text-align: left;
}

.title-logo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1035px;
    padding: 2rem 0;
    box-sizing: border-box;
    min-height: 160px;  /* Change from fixed height to min-height */
}

/* Standardize both horizontal lines */
.header::after,
.title-logo::after {
    /* Remove this combined selector */
}

.title-logo::after {
    /* Remove this */
}

/* Update main text positioning */
.main-text {
    position: relative;  /* Change from absolute to relative */
    font-size: clamp(2rem, 4vw, 3.76rem);  /* Reduced by 20% */
    font-weight: bold;
    background: linear-gradient(
        90deg,
        #4f46e5 0%,
        #a855f7 50%,
        #4f46e5 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    animation: gradient-wave 8s linear infinite;
    text-align: center;
    z-index: 2;
    margin: 0;
    width: 100%;
}

/* Update sub text positioning */
.sub-text {
    position: relative;  /* Change from absolute to relative */
    font-size: clamp(1.2rem, 2.5vw, 2.1rem);  /* Responsive font size */
    opacity: 0;
    transition: opacity 2s ease-in-out;
    animation: pulse 6s ease-in-out infinite;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
    margin-top: 1rem;  /* Use margin instead of absolute positioning */
    padding-right: 15%;  /* Use percentage for right padding */
    z-index: 2;
    width: 100%;
}

@keyframes pulse {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.7;
    }
}

@keyframes gradient-wave {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Update particles container */
.particles-container {
    position: absolute;
    height: 100%;
    width: 120%;
    top: 0%;
    left: -10%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

/* Update particle animations */
.particle {
    position: absolute;
    width: 0.3vw;  /* Use viewport units */
    height: 0.3vw;
    max-width: 3px;  /* Set maximum size */
    max-height: 3px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    pointer-events: none;
}

/* Remove the character-based content */
.particle::before { content: none; }

/* Alternate colors for binary feel */
.particle:nth-child(odd) { background: rgba(79, 70, 229, 0.95); } /* Indigo */
.particle:nth-child(even) { background: rgba(168, 85, 247, 0.95); } /* Purple */

@keyframes fall-down {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    15% {
        opacity: 0.95;
        transform: translateY(52px) translateX(var(--x-offset)) scale(2.1); /* Reduced from 65px and 2.6 */
    }
    85% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(176px) translateX(var(--x-offset)) scale(5.2); /* Reduced from 220px and 6.5 */
        opacity: 0;
    }
}

/* Adjust particle positions to spread across wider area */
.particle:nth-child(1) { --x-offset: 1px; animation: fall-down 4.5s linear infinite 0.4s; left: 30%; top: 20%; }
.particle:nth-child(2) { --x-offset: -1px; animation: fall-down 4.5s linear infinite 2.1s; left: 40%; top: 15%; }
.particle:nth-child(3) { --x-offset: 1px; animation: fall-down 4.5s linear infinite 1.2s; left: 50%; top: 25%; }
.particle:nth-child(4) { --x-offset: -1px; animation: fall-down 4.5s linear infinite 2.8s; left: 60%; top: 18%; }
.particle:nth-child(5) { --x-offset: 1px; animation: fall-down 4.5s linear infinite 0.9s; left: 70%; top: 22%; }
.particle:nth-child(6) { --x-offset: -1px; animation: fall-down 4.5s linear infinite 1.7s; left: 45%; top: 12%; }

/* Posts Section Styles */
.posts-section {
    position: relative;  /* Add this to position the line */
    padding: 3rem 0 4rem;
    margin-top: 40px;
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Add the line before the posts section */
.posts-section::before {
    content: '';
    position: absolute;
    top: 0;  /* Position at the top of posts section */
    left: 50%;
    transform: translateX(-50%);
    width: 1035px;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(17, 17, 17, 1) 0%,
        transparent 15%,
        #4f46e5 35%,
        #a855f7 50%,
        #4f46e5 65%,
        transparent 85%,
        rgba(17, 17, 17, 1) 100%
    );
    opacity: 0.8;
    animation: gradient-wave 8s linear infinite;
    background-size: 200% 100%;
}

.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 2rem;
    margin-left: 0;
}

.see-all {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
}

.posts-grid {
    display: block;
    max-width: 800px;
    margin: 0 0 0 2rem; /* Match the header's padding */
}

.post-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Add a subtle border */
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.post-card h3 {
    margin: 10px 0;
    color: #eeeeee;
}

.post-card p {
    color: #888;
    margin: 0;
    font-size: 0.9em;
}

/* Consolidate dropdown styles */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    z-index: 1000;  /* Ensure dropdown is above other elements */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #121212;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
    z-index: 1000;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    top: 100%;
    left: -20px;
    padding-top: 5px;
    margin-top: 10px;
}

/* Add invisible bridge between trigger and dropdown */
.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -20px;
    width: 200px;  /* Wide enough to cover dropdown */
    height: 20px;  /* Tall enough to bridge the gap */
    background: transparent;
}

/* Add invisible area around dropdown content */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;  /* Extend above to meet the bridge */
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Style dropdown items */
.dropdown-item {
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Add hover effect for nav links */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        #4f46e5 0%,
        #a855f7 50%,
        #4f46e5 100%
    );
    background-size: 200% 100%;
    transition: width 0.3s ease;
    animation: gradient-wave 8s linear infinite;
}

.nav-link:hover::after {
    width: 100%;
}

/* Update dropdown item hover effect */
.dropdown-item {
    position: relative;
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 100%
    );
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: linear-gradient(
        90deg,
        rgba(79, 70, 229, 0.1) 0%,
        rgba(168, 85, 247, 0.1) 50%,
        rgba(79, 70, 229, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: gradient-wave 8s linear infinite;
}

/* Add underline effect for dropdown items */
.dropdown-item::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 16px;
    width: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        #4f46e5 0%,
        #a855f7 50%,
        #4f46e5 100%
    );
    background-size: 200% 100%;
    transition: width 0.3s ease;
    animation: gradient-wave 8s linear infinite;
}

.dropdown-item:hover::after {
    width: calc(100% - 32px);  /* Account for padding */
}

.typing-container {
    width: 350px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    padding-top: 0;  /* Remove top padding */
}

.typing-text {
    margin-top: -10px;  /* Move text up by adding negative margin */
}

/* Add responsive styles for smaller screens */
@media (max-width: 768px) {
    .header {
        padding: 1rem 1rem; /* Reduce padding on smaller screens */
    }

    .header-container {
        padding-left: 0px; /* Reduce padding for icon on smaller screens */
    }

    .nav-left {
        padding-left: 0px;  /* Adjust accordingly */
    }

    .index-page-title-container {
        padding-top: 5vh;
    }

    .sub-text {
        padding-right: 10%;  /* Less padding on mobile */
    }

    body::before {
        width: 400vw; /* Even wider on mobile */
        height: 400vh;
    }
}

/* Add responsive adjustments for smaller screens */
@media (max-width: 900px) {
    .header::after,
    .header-container,
    .title-logo,
    body::before,
    .posts-section::before {
        width: 90vw;
    }
}

/* Add new media query for narrower screens */
@media (max-width: 1000px) {  /* Adjust this breakpoint as needed */
    .nav-right {
        display: none;  /* Hide login/signup buttons */
    }

    .navbar {
        justify-content: flex-start;  /* Align remaining items to the left */
    }
}

/* Update logo link */
.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;  /* Remove all margins */
    padding: 0;  /* Remove all padding */
    transform: none;
}

/* Remove the hover effect entirely */
.logo-link:hover {
    transform: none;
}

/* Update logo icon to be completely static */
.logo-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    left: 0;
    transform: none; /* Prevent any transforms */
}

.enhanced-title {
    color: #ffffff; /* Set text color to white */
    font-weight: 700; /* Make it bold */
    text-shadow: 
        0 0 5px rgba(79, 70, 229, 0.7), /* Blue glow */
        0 0 10px rgba(79, 70, 229, 0.5), /* Blue glow */
        0 0 15px rgba(168, 85, 247, 0.5), /* Purple glow */
        0 0 20px rgba(168, 85, 247, 0.3); /* Purple glow */
    animation: gradient-wave 8s linear infinite; /* Optional: Add animation effect */
}

.post-description {
    color: white !important; /* Force text color to white */
}

/* Update the title color for Spanreed post */
spanreed-title {
    color: white !important; /* Force text color to white */
}

/* Update the description color for Spanreed post */
spanreed-description {
    color: white !important; /* Force text color to white */
}

.spanreed-title {
    color: white !important; /* Force text color to white */
}

.spanreed-description {
    color: white !important; /* Force text color to white */
}

/* LiveGrid special styling */
.livegrid-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9) !important;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #4f46e5, #a855f7);
    border-radius: 50%;
    display: inline-block;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(79, 70, 229, 0.6);
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 6px rgba(79, 70, 229, 0.6);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
        box-shadow: 0 0 12px rgba(168, 85, 247, 0.8);
    }
}

.livegrid-link:hover {
    color: rgba(255, 255, 255, 1) !important;
}

.livegrid-link:hover .live-indicator {
    animation-duration: 1s;
}

/* LiveGrid Post Live Indicators */
.livegrid-post {
    position: relative;
}

.post-live-indicator {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #4f46e5, #a855f7);
    border-radius: 50%;
    display: inline-block;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(79, 70, 229, 0.6);
}

.corner-indicator {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    width: 10px;
    height: 10px;
    border: 2px solid rgba(0, 0, 0, 0.8);
}

.title-indicator {
    margin-left: 8px;
    width: 6px;
    height: 6px;
    vertical-align: middle;
}

.vibecoding-image-container {
    position: relative;
}

/* Enhanced hover effects for LiveGrid post */
.livegrid-post:hover .post-live-indicator {
    animation-duration: 1s;
}