:root {
    --bg-color: #f0f9ff;
    --text-color: #334155;
    --heading-color: #0f172a;
    --primary-color: #0ea5e9;
    --primary-hover: #0284c7;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --border-color: #e2e8f0;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #22c55e;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0f172a;
        --text-color: #cbd5e1;
        --heading-color: #f8fafc;
        --primary-color: #38bdf8;
        --primary-hover: #7dd3fc;
        --card-bg: #1e293b;
        --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
        --border-color: #334155;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--text-color);
}

.logout-btn {
    background-color: var(--danger-color);
    color: white;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 6px;
    transition: background-color 0.2s;
    font-weight: 500;
}

.logout-btn:hover {
    background-color: var(--danger-hover);
}

.filter-section {
    background-color: var(--card-bg);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.filter-section label {
    display: inline-block;
    margin-right: 10px;
    font-weight: 600;
    color: var(--heading-color);
}

.filter-section select,
.filter-section input {
    padding: 8px 12px;
    margin-right: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.filter-section button {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
    font-weight: 500;
}

.filter-section button:hover {
    background-color: var(--primary-hover);
    opacity: 0.9;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-top: 20px;
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

th, td {
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
    text-align: left;
    color: var(--text-color);
}

th {
    background-color: var(--bg-color);
    color: var(--heading-color);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: var(--bg-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 6px;
    transition: background-color 0.2s, transform 0.1s;
    font-weight: 500;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

form {
    display: none;
    background-color: var(--card-bg);
    padding: 30px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

form.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    margin: 8px 0 20px 0;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--primary-color);
    border-color: transparent;
}

label {
    display: block;
    font-weight: 600;
    margin-top: 10px;
    color: var(--heading-color);
}

#authSection {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

#authSection h1 {
    text-align: center;
    color: var(--heading-color);
    margin-bottom: 10px;
}

#authSection h2 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 30px;
    font-weight: normal;
}

#authSection input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
}

#authSection button {
    width: 100%;
    margin: 10px 0;
}

.file-thumbnail {
    max-width: 80px;
    max-height: 80px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.file-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

#authStatus {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: var(--text-color);
}

.description-row {
    background-color: var(--bg-color);
    font-style: italic;
    padding: 15px;
    color: var(--text-color);
    border-top: none;
}

/* Auth Footer Styling */
.auth-footer {
    margin-top: 30px;
    text-align: center;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
    width: 100%;
}

.author-credit {
    color: var(--text-color);
    font-size: 0.9em;
    margin-bottom: 15px;
    opacity: 0.8;
}

.author-credit a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Social Buttons Container */
.social-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Shared Button Styles */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white !important;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    flex: 1;
    min-width: 120px;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* GitHub Specific */
.github-btn {
    background-color: #24292e;
}
.github-btn:hover {
    background-color: #000;
}

/* LinkedIn Specific */
.linkedin-btn {
    background-color: #0077b5;
}
.linkedin-btn:hover {
    background-color: #005582;
}

.auth-note {
    margin-top: 15px;
    color: var(--text-color);
    font-size: 0.9em;
    opacity: 0.8;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}