/* General Body Styles */
body {
    margin: 0;
    padding: 0 0 50px 0;
    font-family: 'Arial', sans-serif;
    background: #ffffff;
    color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Title Styling */
h1 {
    font-size: 2.5em;
    margin-top: 50px;
    color: #000000;
    text-align: center;
}

.title-highlight {
    color: #000000;
}

/* Search Bar Container */
.search-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 40px 0;
    width: 700px;
    max-width: 90%;
    gap: 20px; /* Adds white space between input and button */
}

/* Input Box Styling */
.search-container input[type="text"],
.search-input {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid #000000;
    font-size: 1em;
    background: transparent;
    color: #000000;
    outline: none;
    min-width: 0;
    border-radius: 50px; /* Fully oval input */
    box-sizing: border-box;
}

/* Search Button Styling */
.search-container button,
.search-button {
    background: #4CAF50;
    border: 2px solid #000000;
    color: #000000;
    font-size: 1em;
    padding: 15px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 50px; /* Fully oval button */
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.search-container button:hover,
.search-button:hover {
    background-color: #299601; /* dark green on search button hover */
    transform: scale(0.90);
}

/* Placeholder Styling */
.search-container input::placeholder {
    color: rgba(0, 0, 0, 0.6);
}

/* Links */
a,
a:visited {
    color: #49a9f7;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
    color: #0369bd;
}

/* Results Container */
.container,
#results {
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
    margin-top: 30px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Video Entry */
.video-entry {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: rgba(37, 211, 24, 0.08);
    border: 1px solid rgba(0, 0, 0, 1.15);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-entry img {
    width: 180px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Video Info Content */
.video-info-content {
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
}

.video-info-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    color: #000000;
}

.video-info-content p {
    margin: 4px 0;
    font-size: 0.95em;
    line-height: 1.4;
    color: #000000;
}

.video-info-content p strong {
    color: #000000;
}

.initial-message {
    text-align: center;
    font-size: 1.1em;
    color: rgba(0, 0, 0, 0.8);
}

/* Suggestion Box Styles */
.suggestion-container {
    border: 2px solid #4CAF50;
    border-radius: 8px;
    padding: 10px;
    max-width: 800px;
    background-color: #f9f9f9;
    margin-top: 20px;
}

.suggestion-item {
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #e6ffe6;
    cursor: pointer;
   
}

/* Pagination Controls */

/* Pagination wrapper */
#pagination {
  margin-top: 20px;
  text-align: center;
  font-family: Arial, sans-serif;
}

/* Container for buttons */
.pagination-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* Button styles */
.pagination-btn {
  background-color: #f0f0f0; /* light green bg color for all buttons <<< changes needed*/
  border: 1px solid black;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.pagination-btn:hover:not(:disabled):not(.pagination-btn.active) {
  background-color: #d6f5d6; /* dark green hover <<< changes needed*/
  transform: scale(0.90);
}

.pagination-btn:disabled {
  cursor: not-allowed;
  border: 2px solid #000000;
  background-color: lightgrey; /* greyed out style when disabled */
  opacity: 0.5;
}

/* Active (current) page style */
.pagination-btn.active {
  cursor : default;
  background-color: #a5e6a5; /* current page number button <<< changes needed */
  font-weight: bold;
  border: 2px solid #000000;
  color: #000;
}

/* Page info text */
.page-info {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #333;
}


/* Highlighted Matching Text */
mark {
    background-color: yellow;
    color: black;
    padding: 0 2px;
    border-radius: 3px;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
        margin-top: 30px;
    }

    .search-container {
        flex-direction: column;
        max-width: 95%;
        margin-bottom: 10px;
        gap: 12px;
    }

    .search-container input[type="text"] {
        border-radius: 50px;
        padding: 12px 15px;
        text-align: center;
    }

    .search-container button {
        border-radius: 50px;
        padding: 12px 15px;
        justify-content: center;
    }

    .container {
        padding: 0 10px;
    }

    .video-entry {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        gap: 15px;
    }

    .video-entry img {
        width: 100%;
        height: auto;
        max-height: 180px;
    }

    .video-info-content h3 {
        font-size: 1.1em;
    }

    .video-info-content p {
        font-size: 0.9em;
    }
}

/*duration to be displayed at the bottom of thumbnail*/
.thumbnail-container {
    text-align: center;
}
.video-duration {
    font-size: 0.9em;
    color: #333;
    margin-top: 5px;
}