/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    overscroll-behavior-y: contain;
}

/* Header */
.site-header {
    background-color: #000;
    height: 70px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid #333;
    position: relative;
    z-index: 25;
}

.hamburger-menu {
    cursor: pointer;
    padding: 8px;
}

.logo {
    padding: 8px;
}

.logo img {
    object-fit: contain;
    width: 40px;
    height: 40px;
}

.header-spacer {
    flex-grow: 1;
}

/* Main Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Stream Container */
.streams-container {
    flex: 1;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    height: calc(100vh - 70px); /* Adjust for header height */
}

.streams-container::-webkit-scrollbar {
    display: none;
}

/* Individual Stream */
.stream-item {
    height: calc(100vh - 70px); /* Adjust for header height */
    width: 100%;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-background {
    position: absolute;
    inset: 0;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.stream-background img,
.stream-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.stream-video {
    display: block;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to bottom, transparent, transparent 70%, rgba(0,0,0,0.8));
    z-index: 2;
}

/* Live Indicator */
.live-indicator {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
}

.live-badge {
    background-color: #e4344e;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 2px;
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    margin-right: 4px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.viewers-count {
    background-color: rgba(0,0,0,0.6);
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 2px;
}

/* Stream Duration */
.stream-duration {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 2px;
    z-index: 20;
}

/* Stream Info */
.stream-info {
    position: absolute;
    left: 16px;
    right: 64px;
    bottom: 84px; /* Increased to avoid overlap with nav bar */
    z-index: 10;
}

.streamer-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stream-title {
    font-size: 14px;
    margin-bottom: 8px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    margin-top: 8px;
}

.tag {
    background-color: #333;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    margin-right: 8px;
    margin-bottom: 4px;
}

/* Actions */
.stream-actions {
    position: absolute;
    right: 16px;
    bottom: 140px; /* Increased to move buttons higher */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    z-index: 10;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.action-icon {
    width: 44px;
    height: 44px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.action-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #000;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.action-icon.active {
    background-color: #4a8cff;
}

.action-icon.active svg {
    stroke: white;
}

.action-label {
    font-size: 12px;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ccc;
    overflow: hidden;
    border: 2px solid white;
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.follow-button {
    background-color: #e4344e;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
}

/* Navigation Bar */
.nav-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #333;
    background-color: #000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-decoration: none;
}

.nav-icon {
    margin-bottom: 4px;
}

.nav-label {
    font-size: 12px;
}

.nav-item.active {
    color: #e4344e;
}

/* Media Query for Desktop */
@media (min-width: 768px) {
    .account-modal {
        padding: 0;
    }
    
    .modal-content {
        max-width: 480px;
        margin: 0 auto;
    }
}

/* Account Creation Modal */
.account-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.account-modal.show {
    display: flex;
}

.modal-content {
    background-color: #1a1a1a;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #a1a1a1;
}

.modal-header {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #333;
}

.modal-header h2 {
    font-size: 20px;
    color: white;
}

.modal-body {
    padding: 24px 16px;
    text-align: center;
}

.modal-body p {
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.5;
    color: #ddd;
}

.cta-button {
    display: block;
    background-color: #e4344e;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 16px;
    border-radius: 50px;
    border: none;
    width: 100%;
    text-align: center;
    margin-bottom: 12px;
    text-decoration: none;
    cursor: pointer;
}

.secondary-button {
    display: block;
    background-color: transparent;
    color: #aaa;
    font-size: 16px;
    padding: 12px 16px;
    border-radius: 50px;
    border: 1px solid #444;
    width: 100%;
    text-align: center;
    cursor: pointer;
}
.video-wrapper {
    position: relative;
}

.video-toggle {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 18px;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.video-toggle:hover {
    background-color: rgba(0, 0, 0, 0.8);
}
