:root {
    --primary-color: #4a6bff;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform var(--transition-speed) ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}

.auth-section {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.user-info {
    margin-bottom: 1rem;
    text-align: center;
}

.user-greeting {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-forms {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-form h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
}

.signup-prompt {
    color: red;
    text-align: center;
    font-weight: bolder;
    font-size: larger;
    cursor: pointer;
    margin-top: 1.5rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(74, 107, 255, 0.1);
    color: var(--primary-color);
}

/* Main Content Styles */
.main-content {
    margin-left: 0;
    transition: margin-left var(--transition-speed) ease;
    min-height: 100vh;
}

.mobile-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    margin-right: 1rem;
    cursor: pointer;
    color: var(--dark-color);
}

.page {
    display: none;
    padding: 2rem 1rem;
}

.page.active {
    display: block;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.developer-credit {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.github-link {
    text-align: center;
    margin-bottom: 1.5rem;
}

.github-link a {
    color: var(--dark-color);
    font-size: 2.5rem;
    transition: transform 0.3s ease;
}

.github-link a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.url-form {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.url-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--dark-color);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.result {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    animation: fadeIn 0.3s ease;
}

.result.hidden {
    display: none;
}

.result p {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.result a {
    word-break: break-all;
    display: inline-block;
    margin-bottom: 1rem;
}

.button-group {
    display: flex;
    gap: 0.75rem;
}

.history-list {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.history-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background-color: #f8f9fa;
}

.history-item-content {
    flex: 1;
    min-width: 0;
}

.history-item-content a {
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.history-item-content small {
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--secondary-color);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a5bef;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.btn-logout {
    background-color: var(--danger-color);
    color: white;
    width: 100%;
}

.btn-logout:hover {
    background-color: #c82333;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background-color: var(--dark-color);
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1100;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background-color: var(--success-color);
}

.toast.error {
    background-color: var(--danger-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: var(--sidebar-width);
    }

    .mobile-header {
        display: none;
    }
}

/* Show sidebar when active */
.sidebar.active {
    transform: translateX(0);
}

/* Utility Classes */
.hidden {
    display: none !important;
}