/* Import fonts */
@font-face {
  font-family: 'Chillax-Bold';
  src: url('../fonts/Chillax-Bold.woff2') format('woff2'),
       url('../fonts/Chillax-Bold.woff') format('woff'),
       url('../fonts/Chillax-Bold.ttf') format('truetype');
       font-weight: 700;
       font-display: swap;
       font-style: normal;
}

/* Base styles */
body { 
    font-family: Arial, sans-serif; 
    max-width: 95%; /* Almost full screen width */
    margin: 0 auto; 
    padding: 20px; 
    line-height: 1.6;
    background-color: #0e1217;
    color: #a9abb3;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Chillax-Bold', Arial, sans-serif;
}

/* Video grid layout */
#videos { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 20px; 
}

/* Individual video card styles */
.video { 
    border: 1px solid #2a2e35; /* Darker border for contrast */
    padding: 10px; 
    text-align: center; 
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-color: #161b22; /* Slightly brighter than background */
}

.video img { 
    max-width: 100%; 
    border-radius: 3px;
}

.video h3 {
    margin: 10px 0;
    font-size: 14px;
    font-family: 'Chillax-Bold', Arial, sans-serif;
}

.video p {
    margin: 5px 0;
    font-size: 12px;
    color: #8b8d91; /* Slightly darker than main text color for secondary info */
}

/* Navigation menu styles */
#menu {
    text-align: right;
    margin-bottom: 20px;
}

#menu a {
    margin-left: 10px;
    text-decoration: none;
    color: #1a73e8;
}

#menu a:hover {
    text-decoration: underline;
}

/* Authentication and status sections */
#signin-button {
    margin: 20px 0;
}

#status-message {
    margin: 20px 0;
    background-color: #161b22; /* Match video card background */
    padding: 15px;
    border-radius: 5px;
}

/* Error message styling */
.error-message {
    color: #ff6b6b;
    background-color: #1f1d1d;
    border: 1px solid #3d1f1f;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
}

/* Status message styling */
.status-message {
    padding: 10px;
    background-color: #161b22;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #2a2e35;
}

/* Video title link styling */
.video a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.video a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    margin: 20px 0;
    text-align: center;
}

.pagination button {
    background-color: #161b22;
    border: 1px solid #2a2e35;
    color: #a9abb3;
    padding: 8px 16px;
    margin: 0 4px;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:hover:not(:disabled) {
    background-color: #1f242b;
}

.pagination span {
    margin: 0 10px;
    color: #a9abb3;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    width: 80%;
    margin: 5% auto;
    padding-bottom: 45%; /* 16:9 Aspect Ratio */
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal.active {
    display: flex;
}