/* Global Styles */
body,
html {
    margin: 0;
    padding: 0;
    font-family: ui-sans-serif, -apple-system, system-ui, Segoe UI, Helvetica, Apple Color Emoji, Arial, sans-serif, Segoe UI Emoji, Segoe UI Symbol;
    background-color: #171717;
    color: #b4b4b4;
    height: 100%; /* Ensure body takes full height */
    overflow-x: hidden; /* Allow vertical scrolling but prevent horizontal scrolling */
    scroll-behavior: smooth; /* Smooth scrolling for better user experience */
}

a {
	color: #b4b4b4;
	text-decoration: none;
}

/* Header Styles */
header {
	background-color: #171717;
	color: #b4b4b4;
	padding: 15px 0;
}

header .container {
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

header .logo {
	margin-left: 24px;
}

header .logo img {
	height: 16px;
}

header .hamburger {
	font-size: 1.5em;
	cursor: pointer;
}

header nav {
	margin-right: 24px;
}

header nav ul {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 20px;
}

header nav ul li {
	padding: 10px;
}

header nav ul li a {
	color: #b4b4b4;
	text-decoration: none;
}

.main {
	display: flex;
	height: calc(102vh - 150px);
	/* Maintain height for index page layout */
	box-sizing: border-box;
	background-color: #212121;
}

/* Files Section */
.files-section {
	position: relative;
	flex: .5;
	background: #0D0D0D;
	padding: 24px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	min-width: 500px;
	max-width: 504px;
}

.files-section h3 {
	margin-top: 0;
}

.files-section .top-right-buttons {
	position: absolute;
	top: 18px;
	right: 24px;
	display: flex;
	gap: 10px;
}

.files-section .top-right-buttons button {
	padding: 8px 15px;
	background-color: transparent;
	color: #8B9B9B;
	border: 1px solid hsla(0, 0%, 100%, .05);
	border-radius: 9999px;
	font-size: 0.9em;
	transition: background-color 0.3s ease, cursor 0.3s ease;
	font-size: 12px;
}

.files-section .top-right-buttons button:hover:enabled {
	background-color: #34495e;
}

.files-section .top-right-buttons button:enabled {
	cursor: pointer;
}

.files-section ul {
	list-style-type: none;
	margin: 0px 40px 0 0;
	padding-left: 20px;
}

.files-section li {
	margin: 5px 0;
}

.files-section label {
	cursor: pointer;
}

.file-options label {
    padding: 8px 24px 13px 17px;
    background-color: transparent;
    color: #8B9B9B;
    border: 1px solid hsla(0, 0%, 100%, .05);
    border-radius: 9999px;
    font-size: 0.9em;
    font-size: 12px;
    display: block;
    width: fit-content;
    margin-bottom: 12px;
}

ul#fileTree {
	margin: 0px 0px 24px 0px;
	font-size: 14px;
	font-family: monospace;
	background: #171717;
	border-radius: 10px;
	padding: 14px 24px 36px 24px;
	display: grid;
	position: relative;
	width: fit-content;
	min-width: 450px;
}

.file-checkbox {
	margin-right: 8px;
}

/* Output Section */
.output-section {
	flex: 1;
	border: none;
	background: rgba(33, 33, 33, .9);
	padding: 24px 38px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
    max-width: 770px;
    margin: 0 auto;
}

.output-field {
	flex: 1;
	overflow-y: auto;
	background: #212121;
}

#outputField {
	flex: 1;
	overflow-y: auto;
	background: #212121;
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-wrap: break-word;
	padding: 0px 10px 0 20px;
	line-height: 24px;
}

pre {
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-wrap: break-word;
	font-family: ui-sans-serif, -apple-system, system-ui, Segoe UI, Helvetica, Apple Color Emoji, Arial, sans-serif, Segoe UI Emoji, Segoe UI Symbol;
}

.input-field {
	display: flex;
	gap: 10px;
	position: relative;
}

.input-field textarea {
	flex: 1;
	padding: 16px;
	border: none;
	border-radius: 20px;
	background-color: #2F2F2F;
	color: #ECECEC;
	font-size: 16px;
	font-family: ui-sans-serif, -apple-system, system-ui, Segoe UI, Helvetica, Apple Color Emoji, Arial, sans-serif, Segoe UI Emoji, Segoe UI Symbol;
	position: relative;
	resize: none;
	/* Disable resizing of the textarea */

}

.input-field textarea:focus {
	outline: none !important;
	border: none;
	box-shadow: none;
}

.input-field button {
	padding: 6px 13px 10px 13px;
	background-color: #fff;
	color: #0E0E0E;
	border: none;
	cursor: pointer;
	position: absolute;
	right: 10px;
	bottom: 10px;
	border-radius: 22px;
	font-size: 18px;
}

.input-field button:hover {
	background-color: #C1C1C1;
}

footer {
	background: #171717;
	color: #b4b4b4;
	text-align: center;
	padding: 0;
	/* Remove extra padding to align vertically */
	display: flex;
	/* Use flexbox for alignment */
	align-items: center;
	/* Center vertically */
	justify-content: center;
	/* Center horizontally */
	height: 50px;
	/* Ensure footer height is consistent */
	box-sizing: border-box;
	/* Include padding and border in height calculation */
}

/* Scrollbars */
.files-section,
.output-field {
	scrollbar-width: thin;
	scrollbar-color: #424242 transparent;
}

.files-section::-webkit-scrollbar,
.output-field::-webkit-scrollbar {
	width: 8px;
}

.files-section::-webkit-scrollbar-track,
.output-field::-webkit-scrollbar-track {
	background: #f4f4f9;
}

.files-section::-webkit-scrollbar-thumb,
.output-field::-webkit-scrollbar-thumb {
	background-color: #bdc3c7;
	border-radius: 20px;
	border: 3px solid #f4f4f9;
}

/* Large Textarea */
.large-textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1em;
	background: #fff;
	resize: none;
}

/* Settings Page Specific Styling */
.settings-container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    overflow-y: auto;
    text-align: center;
	scrollbar-width: thin;
	scrollbar-color: #424242 transparent;
}

.settings-section {
	margin-bottom: 30px;
	padding: 20px;
}

.settings-section h2 {
	margin-bottom: 20px;
	font-size: 1.5em;
	color: #B4B4B4;
	margin-block-start: 0;
}

.settings-section .form-group {
	margin-bottom: 15px;
}

.settings-section .form-group label {
	font-weight: bold;
	display: block;
	margin-bottom: 5px;
}

.settings-section .form-group input,
.settings-section .form-group textarea {
	width: 97%;
	padding: 10px;
	border: 1px solid #dddddd26;
	border-radius: 4px;
}

.settings-section button.save-button {
	margin-top: 10px;
	padding: 10px 20px;
	background-color: #2c3e50;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.settings-section button.save-button:hover {
	background-color: #34495e;
}

.message-inline {
	margin-left: 10px;
	font-size: 0.9em;
	color: #333;
	/* Default text color */
}

.message-inline.success {
	color: #2ecc71;
	/* Green for success */
}

.message-inline.error {
	color: #e74c3c;
	/* Red for error */
}

/* General message styling */
.message {
	padding: 12px 10px;
	word-wrap: break-word;
	color: #ECECEC;
}

/* Styling for multi-line code blocks */
.message pre {
	background: #0D0D0D;
	padding: 20px;
	border-bottom-left-radius: .375rem;
	border-bottom-right-radius: .375rem;
	overflow-x: auto;
	/* Horizontal scrolling for long lines */
	white-space: pre-wrap;
	/* Wrap long lines */
	font-family: monospace;
	color: #dfc47d;
	margin: 0;
}

/* Styling for inline code */
.message code {
	padding: 2px 5px;
	border-radius: 3px;
	font-family: monospace;
	color: #dfc47d;
	background: #0D0D0D;
}

/* Bold text */
.message strong {
	font-weight: bold;
}

.message h3 {
	display: block;
	font-size: 1.17em;
	margin-block-start: 0;
	margin-block-end: 0;
	margin-inline-start: 0px;
	margin-inline-end: 0px;
	font-weight: bold;
	unicode-bidi: isolate;
}

/* User message styling (right-aligned, grey box) */
.user-message {
	background-color: #303030;
	color: #E7E7E7;
	align-self: flex-end;
	text-align: right;
	margin-left: auto;
	/* Push to the right */
	margin-bottom: 24px;
	padding: 14px 22px;
	border-radius: 16px;
    width: 540px;
}

.codeType {
	color: #b4b4b4;
	margin-bottom: 0;
	border-top-left-radius: .375rem;
	border-top-right-radius: .375rem;
	background-color: #2f2f2f;
	padding: 10px 14px;
	text-transform: lowercase;
	font-size: 12px;
}

.openai-message {
	margin-bottom: 20px;
}


input[type="checkbox"] {
    vertical-align: bottom;
    width: 10px;
    position: relative;
    top: 2px;
}

/* Optional: Customizations for code blocks */
pre[class*="language-"] {
  background: #2d2d2d; /* Dark background */
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto; /* Horizontal scrolling for long lines */
}

code[class*="language-"] {
  font-size: 0.95em;
  line-height: 1.5;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #6c757d; /* Grey for comments */
}

.token.punctuation {
  color: #999;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
  color: #e06c75; /* Red for properties */
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #98c379; /* Green for strings */
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #56b6c2; /* Cyan for operators */
}

.token.atrule,
.token.attr-value,
.token.keyword {
  color: #c678dd; /* Purple for keywords */
}

.token.function,
.token.class-name {
  color: #61afef; /* Blue for functions */
}

.token.regex,
.token.important,
.token.variable {
  color: #d19a66;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

/* Login Page Styling */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: #212121; /* Match the background color of other sections */
    color: #b4b4b4; /* Consistent text color */
    padding: 20px;
    box-sizing: border-box;
}

.login-container h2 {
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #e7e7e7; /* Lighter color for the heading */
}

.login-container p {
    color: #e74c3c; /* Red for error messages */
    font-size: 0.9em;
    margin-bottom: 15px;
}

form {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-container form {
	margin: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

label {
    font-size: 0.9em;
    color: #e7e7e7; /* Match text color to other form elements */
}

input[type="text"] {
    padding: 12px;
    border: none;
    border-radius: 6px;
    background-color: #3a3a3a;
    color: #e7e7e7;
    font-size: 0.95em;
}

input[type="password"] {
    padding: 12px;
    border: none;
    border-radius: 6px;
    background-color: #3a3a3a;
    color: #e7e7e7;
    font-size: 0.95em;
}

input[type="password"]:focus {
    outline: none;
    border: 1px solid #61afef; /* Subtle border on focus */
}

button[type="submit"] {
    padding: 12px 15px;
    background-color: #393937;
    color: #dfc47d;
    border: 1px solid hsla(0, 0%, 100%, .05);
    border-radius: 6px;
    font-size: 0.9em;
    transition: background-color 0.3s ease, cursor 0.3s ease;
    font-size: 12px;
	cursor: pointer;
}

button[type="submit"]:hover {
    background-color: #535340; /* Slightly darker blue on hover */
}

button[type="submit"]:active {
    background-color: #535340; /* Even darker blue for active state */
}

button[type="submit"]:focus {
    outline: none;
}

.login-logo {
	width: 124px; 
	margin: auto; 
	position: absolute; 
	top: 40px;
}

.login-logo img {
	width: 100%;
}

.undernote {
	margin: 16px auto;
}

.undernote a {
	text-decoration: none;
	color: #dfc47d;
}

.login-links {
	margin: 120px auto;
}

.login-links a {
	text-decoration: none;
	color: #dfc47d;
}

/* Styling for dots animation */
.dots-animation {
  display: inline-block;
}

.dots-animation span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  background-color: #888;
  border-radius: 50%;
  animation: dots 1.4s infinite;
}

.dots-animation span:nth-child(1) {
  animation-delay: 0s;
}
.dots-animation span:nth-child(2) {
  animation-delay: 0.2s;
}
.dots-animation span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dots {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
}

/* Specific styling for the phone number and email fields */
#phoneNumber,
#email {
    padding: 12px; /* Uniform padding for a neat look */
    border: none; /* Remove default borders */
    border-radius: 6px; /* Smooth corners */
    background-color: #3a3a3a; /* Dark background to match theme */
    color: #e7e7e7; /* Light text for contrast */
    font-size: 0.95em; /* Readable font size */
    width: 100%; /* Full-width input fields */
    box-sizing: border-box; /* Include padding in width */
}

#phoneNumber:focus,
#email:focus {
    outline: none; /* Remove focus outline */
    border: 1px solid #61afef; /* Subtle blue border on focus */
    background-color: #2e2e2e; /* Slightly darker background on focus */
    color: #ffffff; /* White text for better contrast */
}

/* Optional: Add placeholder styling for consistency */
#phoneNumber::placeholder,
#email::placeholder {
    color: #8b8b8b; /* Subtle grey for placeholder text */
    font-size: 0.9em; /* Slightly smaller placeholder text */
}

#passwordError {
    margin-top: 10px;
    color: #e74c3c; /* Red for error */
    font-size: 0.9em;
    display: none; /* Initially hidden */
}

.terms-content {
    margin: 20px 0;
    padding: 20px;
    background-color: #2f2f2f;
    border-radius: 8px;
    color: #e7e7e7;
    font-size: 0.95em;
    line-height: 1.6;
}

.terms-content h3 {
    color: #dfc47d;
    margin-bottom: 10px;
}

.terms-content ul {
    margin: 10px 0 20px 20px;
    padding-left: 20px;
    list-style-type: disc;
}

/* Privacy Content Scrolling */
.privacy-content {
    max-width: 800px;
    margin: 20px auto; /* Center the content */
    padding: 20px;
    background-color: #2f2f2f;
    border-radius: 8px;
    color: #e7e7e7;
    font-size: 0.95em;
    line-height: 1.6;
    overflow-y: auto; /* Enable scrolling within this section if needed */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Add subtle shadow for style */
}

/* Privacy Content Headings */
.privacy-content h3 {
    color: #dfc47d;
    margin-bottom: 10px;
}

/* Links Styling */
.privacy-content a {
    color: #dfc47d;
    text-decoration: none;
}

.privacy-content ul {
    margin: 10px 0 20px 20px;
    padding-left: 20px;
    list-style-type: disc;
}

.privacy-container {
    max-width: 800px;
    margin: 100px auto; /* Adjusted margin to create space */
    padding: 20px 30px;
    background-color: #212121;
    color: #b4b4b4;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.privacy-header {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    color: #dfc47d;
}

/* Add space between the logo and the content */
.login-logo {
    margin-bottom: 40px; /* Adjusted spacing to avoid overlap */
    text-align: center;
}

.login-logo img {
    max-width: 200px; /* Ensure the logo fits well */
    height: auto;
}



@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }

    form {
        padding: 15px;
    }

    button[type="submit"] {
        font-size: 0.9em;
    }
}
