body {
    /* Optional: Add some margin reset for full control */
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, Arial, sans-serif;
    background-color: #404231;
	padding: 10px;
	background-image: url('../img/1.jpg');
	/* Optional background properties */
	background-repeat: no-repeat; /* Prevents image from repeating */
	background-size: cover;      /* Covers the entire element without stretching */
	background-position: center; /* Centers the image */
}

header {
    background-color: #333;
    color: white;
    padding: 1px 0;
    text-align: center;
}

h1 {
    font-size: 1em;
    margin: 0;
    white-space: nowrap; /* Prevent words from wrapping */
	font-family: Tahoma, sans-serif;
	padding: 10px;
	color: orange;
}

h2 {
    font-size: .5em;
    margin: 0;
    white-space: nowrap; /* Prevent words from wrapping */
	position: absolute;
	left: 60%;
	font-family: 'Brush Script MT', cursive;
	color: yellow;
}

.animated-text-container {
    overflow: hidden; /* Hide overflowing text */
    height: 4em; /* Adjust to fit one line of text */
    display: center; /* Allow proper positioning of words */
	
}

.animated-word {
    display: center;
    position: relative;
    opacity: 0;
    transform: translateY(100%);
    animation: slide-in-out 5s infinite; /* 3 words * 3s per word */
}

.animated-word:nth-child(2) { /* Second animated word */
    animation-delay: .2s;
}

.animated-word:nth-child(3) { /* Third animated word */
    animation-delay: .4s;
}

.animated-word:nth-child(4) { /* Third animated word */
    animation-delay: .6s;
}

.animated-word2 {
    display: center;
    position: relative;
    opacity: 0;
    transform: translateY(100%);
    animation: slide-in-out 5s infinite; /* 3 words * 3s per word */
}

.animated-word2:nth-child(2) { /* Third animated word */
    animation-delay: .9s;
}

@keyframes slide-in-out {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(0);
    }
    40% {
        opacity: 0;
        transform: translateY(-100%);
    }
    100% {
        opacity: 0;
        transform: translateY(-100%);
    }
}

.button-container {
    /* Method 1: Using Flexbox for centering (highly recommended) */
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center;     /* Centers vertically */
    /* Adjust height as needed, e.g., if you want it centered in the viewport */
    height: 80px; 
    width: 70%;
}

.back-button {
    /* Button Styling */
    padding: 10px 20px;
    color: #ffffff;
    background-color: #007bff; /* Primary blue color */
    border: none;
    border-radius: 30px; /* Pill shape for a modern look */
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3); /* Subtle shadow */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease; /* Smooth hover effects */
}

.back-button:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.4); /* Enhanced shadow on hover */
}

.back-button:active {
    transform: translateY(0); /* Press down effect */
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

        /* Grid container for the previews */
        .preview-grid {
            display: grid;
            /* Creates a responsive grid: min 300px width per column, up to 4 columns */
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 15px;
            padding: 20px;
        }
        .stream-container {
            position: relative;
            /* Ensures aspect ratio (16:9) */
            padding-bottom: 56.25%; /* 9 / 16 * 100% */
            height: 0;
            overflow: hidden;
            background-color: #333;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            cursor: pointer; /* Indicates it's clickable */
            transition: transform 0.2s;
        }
        .stream-container:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        }
        .stream-iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
            /* This is the key to pass the URL to the embedded player */
        }
        .stream-title {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            padding: 5px;
            text-align: center;
            font-size: 0.9em;
            z-index: 10;
        }

        /* Fullscreen view styling */
        .fullscreen-overlay {
            display: none; /* Hidden by default */
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.95);
            z-index: 9999; /* High Z-index to cover everything */
        }
        .fullscreen-iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
        .close-button {
            position: absolute;
            top: 20px;
            right: 20px;
            background: red;
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 5px;
            cursor: pointer;
            z-index: 10000;
            font-size: 1.2em;
        }

        @media (max-width: 600px) {
            .preview-grid {
                grid-template-columns: 1fr; /* Single column on small screens */
            }
        }