/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f8ff; /* AliceBlue - a very light blue */
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: auto;
    background-color: #ffffff; /* White */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #add8e6; /* LightBlue */
    padding-bottom: 15px;
}

header h1 {
    color: #005a9c; /* A darker blue */
}

.video-section, .comments-section {
    margin-bottom: 30px;
}

.video-section h2, .comments-section h2, #comment-form-area h3 {
    color: #007bff; /* Primary Blue */
    margin-bottom: 15px;
}

video {
    border-radius: 5px;
    border: 1px solid #ddd;
}

#comment-form-area {
    background-color: #e7f3ff; /* Lighter blue tint for form area */
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.replying-to-area {
    background-color: #d1ecf1; /* Light cyan for replying notice */
    color: #0c5460;
    padding: 8px 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.9em;
}
.replying-to-area .btn-tiny {
    padding: 2px 6px;
    font-size: 0.8em;
    margin-left: 10px;
    background-color: #adb5bd;
    color: white;
}
.replying-to-area .btn-tiny:hover {
    background-color: #9098a0;
}


#commentText {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #add8e6; /* LightBlue */
    border-radius: 4px;
    min-height: 80px;
    resize: vertical;
}

.form-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}
.form-controls > * {
    margin-bottom: 5px; /* Spacing for wrapped items */
}


.file-input-wrapper {
    display: flex;
    align-items: center;
}

.file-name-display {
    margin-left: 10px;
    font-size: 0.9em;
    color: #555;
    font-style: italic;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #007bff; /* Primary Blue */
    color: white;
}
.btn-primary:hover {
    background-color: #0056b3; /* Darker Blue */
}

.btn-secondary {
    background-color: #6c757d; /* Gray */
    color: white;
}
.btn-secondary:hover {
    background-color: #545b62; /* Darker Gray */
}

.btn-info {
    background-color: #17a2b8; /* Teal/Info Blue */
    color: white;
}
.btn-info:hover {
    background-color: #117a8b; /* Darker Teal */
}
.btn-action { /* For Reply, Translate buttons */
    background-color: #5cb85c; /* Greenish */
    color: white;
    font-size: 0.85em;
    padding: 5px 10px;
    margin-right: 5px;
}
.btn-action:hover {
    background-color: #4cae4c;
}


.image-preview-container img, .giphy-preview-container-form img {
    max-width: 150px;
    max-height: 150px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: block;
}

.comments-list .comment-item {
    background-color: #fdfdfd;
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}
.comment-item .comment-header {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 8px;
}
.comment-item .comment-header .uid {
    font-weight: bold;
    color: #005a9c;
    cursor: pointer;
}
.comment-item .comment-header .uid:hover {
    text-decoration: underline;
}
.comment-item .comment-header .timestamp {
    float: right;
    font-style: italic;
    color: #777;
}

.comment-item p.comment-content { /* Added class for content paragraph */
    margin-bottom: 10px;
    word-wrap: break-word;
    white-space: pre-wrap; /* Preserve line breaks from textarea */
}

.comment-item .comment-image, .comment-item .comment-emoji {
    max-width: 250px; /* Slightly larger for posted comments */
    max-height: 250px;
    display: block;
    margin-top: 10px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.comment-item .comment-actions {
    margin-top: 10px;
}

.comment-item .replies {
    margin-left: 30px; /* Indent replies */
    margin-top: 15px;
    padding-left: 15px;
    border-left: 2px solid #add8e6; /* LightBlue */
}


/* Modal Styles */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close-button:hover,
.close-button:focus {
    color: #005a9c;
    text-decoration: none;
    cursor: pointer;
}

#emojiSearchKeyword {
    width: calc(100% - 100px);
    padding: 10px;
    margin-right: 10px;
    margin-bottom: 15px;
    border: 1px solid #add8e6;
    border-radius: 4px;
}

.emoji-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    margin-top: 10px;
}
.emoji-results-grid img {
    width: 100%;
    height: auto;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border-color 0.2s;
}
.emoji-results-grid img:hover {
    border-color: #007bff;
}

.tab-bar {
    display: flex;
    justify-content: center; /* Or space-around, space-between */
    margin-bottom: 20px;
    background-color: #e9ecef; /* Light grey background */
    padding: 10px 0;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.tab-bar a {
    padding: 10px 20px;
    text-decoration: none;
    color: #007bff; /* Bootstrap primary blue */
    font-weight: bold;
    border-radius: 3px;
    margin: 0 5px; /* Spacing between tabs */
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
.tab-bar a:hover {
    background-color: #0056b3; /* Darker blue on hover */
    color: white;
}
.tab-bar a.active { /* Style for the current active tab */
    background-color: #007bff;
    color: white;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
body {
    padding-top: 60px; /* Adjust if your nav bar height is different */
    margin:0; /* Ensure no default body margin interferes */
}
.top-nav {
    background-color: #005a9c; /* Or your theme color */
    padding: 10px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - 40px); /* Full width minus L/R padding of nav */
    z-index: 1000;
    box-sizing: border-box; /* Or width: 100%; padding: 10px 0; and inner container for content */
}
.top-nav .nav-links a, .top-nav .user-actions a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    font-weight: bold;
}
.top-nav a:hover {
    text-decoration: underline;
}
.top-nav .user-info {
     font-size: 0.9em;
}