/* Typography and Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&family=Lora:wght@400;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    color: #212529;
    background-color: #f9f9fa;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Container and Layout */
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Header */
h1 {
    font-family: 'Lora', serif;
    color: #5e3b76;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2 {
    font-family: 'Lora', serif;
    color: #5e3b76;
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

/* Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 1rem;
}

input[type="text"]:focus {
    border-color: #5e3b76;
    box-shadow: 0 0 5px rgba(94, 59, 118, 0.2);
}

/* Buttons */
button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    color: #ffffff;
    background-color: #8c68cd;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #5e3b76;
}

/* Additional Styling */
.url-field {
    margin-bottom: 0.5rem;
}

button[type="button"] {
    background-color: #ced4da;
    color: #212529;
}

button[type="button"]:hover {
    background-color: #adb5bd;
}

/* Links */
a {
    color: #8c68cd;
    text-decoration: none;
}

a:hover {
    color: #5e3b76;
}

/* Main container for sidebar and content */
.main-container {
    display: flex;
    flex-wrap: wrap;
}

/* Sidebar styling */
.sidebar {
    width: 200px;
    background-color: #5e3b76;
    padding: 1rem;
    color: #ffffff;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin-bottom: 1.5rem;
}

.sidebar a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
}

.sidebar a:hover {
    color: #b9a9d0;
}

/* Content styling, aligned to the right of sidebar */
.content {
    margin-left: 220px;
    padding: 2rem;
    flex: 1;
}

/* Form styling in settings */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #5e3b76;
    margin-bottom: 0.5rem;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 1rem;
}

button[type="submit"] {
    margin-top: 1rem;
    background-color: #8c68cd;
    color: #ffffff;
}

/* Database status message */
.db-status {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background-color: #f8f9fa;
    color: #333;
    padding: 0.5rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Error Message Styling */
.error-message {
    color: red;
    font-weight: bold;
}

/* Extracted Information Styling */
.extracted-info {
    background-color: #f1f1f1;
    padding: 1rem;
    border-radius: 8px;
}


/* Responsive Layout */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        margin: 0;
        max-width: 100%;
    }

    h1 {
        font-size: 2rem;
    }

    input[type="text"],
    button {
        font-size: 0.9rem;
    }

    .sidebar {
        position: relative;
        width: 100%;
        min-height: unset;
        padding: 0.5rem;
        text-align: center;
    }

    .sidebar ul {
        display: flex;
        justify-content: space-around;
    }

    .content {
        margin-left: 0;
        padding: 1rem;
    }

    .form-group label {
        font-size: 1rem;
    }

    .form-group input[type="text"],
    textarea {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    button {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .db-status {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

/* Responsive adjustments for very small screens (e.g., iPhone SE) */
@media (max-width: 576px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .sidebar ul {
        flex-direction: column;
        gap: 1rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .db-status {
        font-size: 0.75rem;
    }
}
