/* styles/style.css */

/* RESET AND GLOBAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden; /* Prevent body from scrolling */
}

body {
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    background: #0f0f0f; /* Solid dark background */
    cursor: none; /* Hide default cursor */
}

/* MAIN CONTAINER */
.main-container {
    display: flex;
    height: 100vh;
    width: 100%;
    padding: 2.5%; /* 5% total padding (2.5% left + 2.5% right) */
    gap: 0; /* No gap since padding handles spacing */
    box-sizing: border-box;
    align-items: stretch; /* Ensure columns stretch to equal height */
}

/* LEFT COLUMN: AVATAR */
.hero-image-container {
    width: 40%;
    padding-right: 2.5%; /* 5% gap between columns */
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f0f0f; /* Match the body background */
}

.hero-image {
    width: calc(100% - 10px); /* Adjust for padding and border */
    height: 100%; /* Match the container's height */
    object-fit: contain; /* Ensure the entire image fits without distortion */
    border-radius: 10px; /* Slight rounding for aesthetics */
    border: 3px solid #e50914;
    transition: box-shadow 0.3s ease;
}

.hero-image.glow {
    box-shadow: 0 0 20px #e50914;
}

/* RIGHT COLUMN: CONTENT */
.content-area {
    width: 60%;
    padding-left: 2.5%; /* 5% gap between columns */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

/* FIXED TITLE CONTAINER */
.fixed-title-container {
    position: sticky;
    top: 2.5%; /* Adjust based on padding */
    padding: 10px 0; /* Vertical padding */
    background: rgba(15, 15, 15, 0.8); /* Semi-transparent background */
    border-radius: 5px;
    margin-bottom: 2.5%; /* Space below the title */
    z-index: 3;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3em; /* Adjust as needed */
    letter-spacing: 2px;
    color: #e50914;
    position: relative;
    display: inline-block;
    text-align: left;
}

/* SCROLLABLE CONTENT */
.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 0; /* Padding is already handled by content-area */
    display: block; /* Changed from flex to block */
    min-height: 0; /* Crucial for proper flexbox scrolling */
}

/* CUSTOM SCROLLBAR STYLES */
.content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.content-wrapper::-webkit-scrollbar-thumb {
    background-color: #e50914;
    border-radius: 4px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #ff4b5c;
}

/* For Firefox */
.content-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #e50914 transparent;
}

/* CONTENT SECTION WITH GRADIENT OVERLAY */
.content-section {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeInUp 2s ease;
}

.content-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #e50914, #3a3a3a, #e50914);
    background-size: 200% 200%;
    animation: contentGradient 8s ease-in-out infinite;
    opacity: 0.3;
    border-radius: 10px;
}

.content-section h2 {
    font-family: 'Orbitron', sans-serif;
    color: #e50914;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.content-section h3 {
    font-family: 'Orbitron', sans-serif;
    color: #e50914;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.content-section p {
    /* Handled via .streaming-text */
}

/* STREAMING TEXT EFFECT */
.streaming-text {
    white-space: pre-wrap; /* Preserve line breaks */
    word-wrap: break-word; /* Allow long words to break */
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    line-height: 1.8em;
    color: #cccccc;
    margin-bottom: 20px;
    position: relative; /* Needed for the cursor */
}

/* CTA SECTION */
.cta-section {
    text-align: center;
    margin-top: 40px;
}

.cta-section p {
    font-size: 1.2em;
    color: #ffffff;
}

/* FOOTER */
.footer {
    margin-top: 40px;
    padding: 20px;
    font-size: 1em;
    color: #888888;
    text-align: center; /* Center align within the content area */
}

/* CUSTOM CURSOR (Mouse-Following) */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #e50914;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    z-index: 9999;
    background: rgba(229, 9, 20, 0.2);
    box-shadow: 0 0 8px #e50914;
}

/* KEYFRAMES */
@keyframes fadeIn {
    0% {opacity:0;}
    100% {opacity:1;}
}

@keyframes fadeInUp {
    0% {
        opacity:0;
        transform: translateY(20px);
    }
    100% {
        opacity:1;
        transform: translateY(0);
    }
}

/* Glitch animations */
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
}

.glitch::before {
    animation: glitchTop 2s infinite;
    color: #e50914;
    clip: rect(0, 9999px, 0, 0);
}

.glitch::after {
    animation: glitchBottom 2s infinite;
    color: #e50914;
    clip: rect(0, 0, 9999px, 0);
}

@keyframes glitchTop {
    0% { clip: rect(0, 9999px, 0, 0); }
    20% { clip: rect(0, 9999px, 100%, 0); transform: translate(2px, -2px); }
    40% { clip: rect(0, 9999px, 0, 0); transform: translate(-2px, 2px); }
    60% { clip: rect(0, 9999px, 100%, 0); transform: translate(2px, 0px); }
    80% { clip: rect(0, 9999px, 0, 0); transform: translate(-1px, 1px); }
    100% { clip: rect(0, 0, 0, 0); transform: translate(0, 0); }
}

@keyframes glitchBottom {
    0% { clip: rect(0, 0, 9999px, 0); }
    20% { clip: rect(0, 9999px, 100%, 0); transform: translate(-2px, 2px); }
    40% { clip: rect(0, 0, 9999px, 0); transform: translate(2px, -2px); }
    60% { clip: rect(0, 9999px, 100%, 0); transform: translate(-2px, 0px); }
    80% { clip: rect(0, 0, 9999px, 0); transform: translate(1px, -1px); }
    100% { clip: rect(0, 0, 9999px, 0); transform: translate(0, 0); }
}

/* Gradient animation for content-section */
@keyframes contentGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Cursor Blink for Typing */
@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* RESPONSIVE STYLES */

/* For screens smaller than 900px (tablet and below) */
@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
    }

    .hero-image-container {
        width: 100%;
        padding-right: 0; /* Remove right padding */
        padding-bottom: 2.5%; /* Add bottom padding */
    }

    .content-area {
        width: 100%;
        padding-left: 0; /* Remove left padding */
    }

    .fixed-title-container {
        position: sticky;
        top: 2.5%; /* Adjust based on padding */
        width: 100%;
        padding: 10px 0; /* Vertical padding */
        background: rgba(15, 15, 15, 0.8);
        margin-bottom: 2.5%; /* Space below the title */
        
        text-align: center;
    }

    .hero-title {
        font-size: 2.5em;
    }

    .content-wrapper {
        margin-top: 0; /* Remove extra space before content */
        padding: 0; /* Remove padding */
        flex: 1;
        max-height: calc(100vh - 150px); /* Adjust based on padding and title height */
    }

    /* CUSTOM SCROLLBAR */
    .content-wrapper::-webkit-scrollbar {
        width: 6px;
    }

    .content-wrapper::-webkit-scrollbar-thumb {
        background-color: #e50914;
        border-radius: 3px;
    }

    .content-wrapper::-webkit-scrollbar-thumb:hover {
        background-color: #ff4b5c;
    }

    .content-wrapper {
        scrollbar-width: thin;
        scrollbar-color: #e50914 transparent;
    }
}

/* For mobile devices (screens smaller than 600px) */
@media (max-width: 600px) {
    .hero-image {
        width: 100%;
    }

    .fixed-title-container {
        top: 2.5%; /* Adjust based on padding */
        padding: 8px 0; /* Vertical padding */
    }

    .hero-title {
        font-size: 2em;
    }

    .content-area {
        padding-left: 0; /* Remove left padding */
        padding-right: 0; /* Remove right padding */
        padding-top: 0; /* Remove top padding */
    }

    .content-wrapper {
        margin-top: 0;
        padding: 0;
        flex: 1;
        max-height: 45%; /*calc(100vh - 160px); /* Adjust based on padding and title height */
    }

    /* CUSTOM SCROLLBAR */
    .content-wrapper::-webkit-scrollbar {
        width: 4px;
    }

    .content-wrapper::-webkit-scrollbar-thumb {
        background-color: #e50914;
        border-radius: 2px;
    }

    .content-wrapper::-webkit-scrollbar-thumb:hover {
        background-color: #ff4b5c;
    }

    .content-wrapper {
        scrollbar-width: thin;
        scrollbar-color: #e50914 transparent;
    }
}
