html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: rgb(239, 251, 238);
    min-height: 100vh;
    color: #333;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1 0 auto;
}

.navbar {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
}

.navbar-brand {
    color: #1a2e35;
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand img {
    opacity: 0.8;
    transition: opacity 300ms ease; /* Standard 300ms transition */
}

.navbar-brand:hover {
    color: rgba(26, 46, 53, 0.8);
}

.website-card {
    transition: all 300ms ease; /* Exact 300ms for all transitions */
    border: 1px solid #ccc;
    background: rgb(239, 251, 238);
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 1;
    transform: translateY(0);
    border-radius: 0;
}

.website-card.new-card {
    animation: highlight-new-card 300ms ease; /* Standard 300ms transition */
}

.website-card.processing {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 300ms ease; /* Standard transition time */
}

.website-card.updated {
    animation: highlight-updated-card 2000ms ease; /* 2 second animation as requested */
}

.website-card.removing {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 300ms ease, transform 300ms ease; /* Standard transition time */
}

.website-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-weight: 600;
    color: #1a1a1a;
    max-width: 450px; /* Increased from 300px */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge {
    padding: 4px 8px;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    min-width: 32px;
    justify-content: center;
}

.status-success {
    background-color: transparent;
    color: #28a745;
}

.status-success.has-changes {
    color: #17a2b8;
}

.status-error {
    background-color: #dc3545;
    color: white;
}

.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-changed {
    background-color: #17a2b8;
    color: white;
}

.change-detected {
    color: #17a2b8;
    font-weight: 500;
    font-size: 0.9rem;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
}

.btn {
    padding: 8px 16px;
    font-weight: 500;
    transition: all 300ms ease; /* Standard 300ms transition */
    border-radius: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #67E8B7 0%, #FFD700 100%);
    border: none;
    color: #1a2e35;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #6c757d;
    border: none;
}

.btn-danger {
    background: #dc3545;
    border: none;
}

.card-body {
    padding: 0.75rem;
}

.timestamps {
    line-height: 1.2;
}

.timestamps .text-muted {
    font-size: 0.75rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.card-actions .btn {
    padding: 4px 8px;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes highlight-new-card {
    0% { box-shadow: 0 0 0 rgba(103, 232, 183, 0); }
    30% { box-shadow: 0 0 15px rgba(103, 232, 183, 0.8); }
    70% { box-shadow: 0 0 15px rgba(103, 232, 183, 0.8); }
    100% { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
}

@keyframes highlight-updated-card {
    0% { background-color: rgb(239, 251, 238); }
    30% { background-color: rgba(103, 232, 183, 0.3); }
    70% { background-color: rgba(103, 232, 183, 0.3); }
    100% { background-color: rgb(239, 251, 238); }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .card-title {
        font-size: 1rem;
        max-width: 280px; /* Increased from 200px */
    }

    .website-info {
        width: 100%;
    }

    .card-actions {
        margin-left: auto;
        flex-direction: column;
        gap: 0.25rem;
    }

    .card-actions .btn {
        padding: 4px 8px;
    }

    .timestamps {
        margin-top: 0.25rem;
        font-size: 0.7rem;
    }
}

.footer {
    margin-top: auto;
    padding: 0.3rem 0;
    background: linear-gradient(135deg, #67E8B7 0%, #FFD700 100%);
    position: sticky;
    bottom: 0;
    width: 100%;
    z-index: 100;
}

.auth-page .footer {
    position: fixed;
    bottom: 0;
    width: 100%;
}

.footer a {
    color: #1a2e35;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    color: rgba(26, 46, 53, 0.9);
}

/* Schedule settings styles */
.schedule-select {
    max-width: 150px;
    display: inline-block;
    font-size: 0.9rem;
    border-radius: 0;
    border: 1px solid rgba(103, 232, 183, 0.5);
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 300ms ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.schedule-select:hover, .schedule-select:focus {
    border-color: rgba(103, 232, 183, 0.8);
    box-shadow: 0 1px 3px rgba(103, 232, 183, 0.2);
}

.schedule-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.schedule-container label {
    min-width: 100px;
    margin-right: 10px;
}

/* Sidebar schedule toggles */
.schedule-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.schedule-toggle input[type="checkbox"] {
    margin-right: 10px;
    height: 1.4em;
    width: 2.8em;
    border: none;
    background-color: rgba(103, 232, 183, 0.1);
    border-color: rgba(103, 232, 183, 0.6);
}

.schedule-toggle input[type="checkbox"]:checked {
    background-color: rgba(103, 232, 183, 0.8);
    border-color: rgba(103, 232, 183, 0.8);
}

.schedule-toggle label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #1a2e35;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background-color: rgb(239, 251, 238);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 300ms ease;
    display: flex;
    flex-direction: column;
}

.sidebar.show {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.sidebar-header h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    color: #333;
}

.sidebar-body {
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0; /* Remove default padding */
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.sticky-bottom {
    position: sticky;
    bottom: 0;
    background-color: rgb(239, 251, 238);
    padding-top: 15px;
    border-top: 1px solid #eee;
    z-index: 5;
}

/* Schedule rows in sidebar */
.schedule-row {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 0;
    margin-bottom: 5px;
    margin-top: 5px;
    padding: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    border: 2px solid rgba(103, 232, 183, 0.3);
    transition: all 300ms ease; /* Standard 300ms transition */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.schedule-row:hover {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: rgba(103, 232, 183, 0.7);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.schedule-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #67E8B7, #FFD700);
}

.schedule-preview {
    font-size: 0.8rem;
    font-style: italic;
    color: #666;
    display: block;
    white-space: nowrap;
}

/* Make the schedule interface more compact */
.schedule-row .col, .schedule-row .col-auto {
    padding: 0 5px;
}

.schedule-row .form-check {
    min-height: auto;
    margin-bottom: 0;
}

/* Day checkbox styles */
.day-checkbox {
    margin-right: 8px;
}

.days-container {
    display: flex;
    flex-wrap: wrap;
    margin-top: 5px;
    gap: 5px;
}

.day-label {
    font-size: 0.8rem;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* Disabled form controls */
.form-select.schedule-fields-1:disabled,
.form-select.schedule-fields-2:disabled,
.form-select.schedule-fields-3:disabled,
.form-select.schedule-fields-4:disabled {
    background-color: rgba(0, 0, 0, 0.05);
    color: #6c757d;
    cursor: not-allowed;
}

/* Auth forms styling */
.auth-card {
    background: rgb(239, 251, 238);
    border: 1px solid #ccc;
    border-radius: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-card .card-header {
    display: none;
}

.auth-form {
    padding: 1.5rem;
}

.auth-form .form-control {
    background-color: rgb(248, 255, 247);
    border-radius: 0;
}

.auth-form .input-group-text {
    border-radius: 0;
}

/* Modal styling */
.modal-content {
    border-radius: 0;
}

.modal-header, .modal-footer {
    border-radius: 0;
}

/* Add website modal */
#addWebsiteModal .form-control {
    background-color: rgb(248, 255, 247);
    border-radius: 0;
}

/* Flash Messages */
.flash-message {
    border-radius: 0;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    animation: slideInDown 300ms ease-out, fadeOut 300ms ease-in 4000ms forwards; /* Standard 300ms transitions with 4s display time */
    position: relative;
    overflow: hidden;
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
        max-height: 100px;
        margin-bottom: 15px;
        padding: 0.75rem 1.25rem;
    }
    to {
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
        padding: 0;
        border: none;
    }
}

/* Toast notification system */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.toast {
    min-width: 280px;
    max-width: 350px;
    background: white;
    color: #333;
    border-radius: 0; /* Square borders */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 300ms ease, transform 300ms ease; /* Standard 300ms transition */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid #ccc;
    animation: fadeInUp 300ms ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.toast.hiding {
    animation: fadeOutUp 300ms ease forwards;
}

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

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    color: #555;
    width: 20px;
    height: 20px;
}

.toast-message {
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #777;
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #333;
}

/* Toast types */
.toast-success {
    border-left-color: #28a745;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-error {
    border-left-color: #dc3545;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-info {
    border-left-color: #17a2b8;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

.toast-warning {
    border-left-color: #ffc107;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

/* Form field max width for better readability */
.form-field-standard {
    max-width: 400px;
    width: 100%;
}

/* Auth card and landing page styles */
.auth-card {
    border: 1px solid #ccc;
    border-radius: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background-color: rgb(239, 251, 238);
}

/* Standardize auth card heights on desktop */
@media (min-width: 768px) {
    .auth-card {
        height: 520px;
        display: flex;
        flex-direction: column;
    }
    
    .auth-form {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
    }
    
    /* Adjust specific form layouts for better vertical alignment */
    .auth-form .mb-4 {
        margin-bottom: 1.25rem !important;
    }
    
    .auth-form form {
        display: flex;
        flex-direction: column;
    }
    
    .auth-form .form-group.mb-3 {
        margin-bottom: 1.25rem !important;
    }
    
    .auth-page .welcome-message {
        height: 520px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.welcome-message {
    max-width: 600px;
    padding: 1rem;
}

.welcome-message h1 {
    color: #1a2e35;
    margin-bottom: 1rem;
}

.welcome-message .lead {
    color: #3c4e56;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.welcome-message li {
    font-size: 1.1rem;
    color: #3c4e56;
    display: flex;
    align-items: center;
}

.separator {
    width: 100%;
}

.separator-line {
    height: 1px;
    background-color: #e0e0e0;
}

.background-logo {
    position: absolute;
    top: -250px;
    left: -200px;
    width: 100%;
    height: 170%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.background-logo img {
    width: 800px;
    opacity: 0.15;
    transform: rotate(-5deg);
}

.opacity-15 {
    opacity: 0.15;
}

.landing-logo {
    width: 100%;
    margin-bottom: 1rem;
}

/* Auth pages mobile optimizations */
@media (max-width: 767px) {
    /* Adjust background logo for mobile auth pages - make it fill the screen */
    .auth-page .background-logo {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        z-index: -1;
        overflow: hidden;
    }
    
    .auth-page .background-logo img {
        width: 150%;
        max-width: none;
        opacity: 0.15;
        transform: rotate(-5deg);
        object-fit: cover;
        height: 150%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-5deg);
    }
    
    /* Mobile welcome message - 2x smaller */
    .auth-page .welcome-message {
        padding: 0.25rem;
        max-width: 200%;
    }
    
    .auth-page .welcome-message h1 {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
        text-align: center;
    }
    
    .auth-page .welcome-message .lead {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
        line-height: 1.2;
        text-align: center;
        padding: 0 0.5rem;
    }
    
    /* Hide list on mobile view */
    .auth-page .welcome-message .list-unstyled {
        display: none;
    }
    
    .auth-page .welcome-message .landing-logo {
        width: 100%;
        /* max-width: 200px; */
        margin: 0 auto 0.3rem;
        display: block;
    }
    
    /* Make auth form extremely compact on mobile to avoid scrolling */
    .auth-page .auth-form {
        padding: 0.75rem;
    }
    
    .auth-page .auth-form .mb-4 {
        margin-bottom: 0.5rem !important;
    }
    
    .auth-page .auth-form h3 {
        font-size: 1.2rem;
        margin-bottom: 0.4rem;
    }
    
    .auth-page .auth-form .form-text,
    .auth-page .auth-form .text-muted {
        font-size: 0.65rem;
        margin-top: 0.25rem !important;
    }
    
    .auth-page .auth-form .form-control {
        padding: 0.4rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .auth-page .auth-form .form-label {
        margin-bottom: 0.25rem;
        font-size: 0.85rem;
    }
    
    .auth-page .auth-form .btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Style the login buttons in mobile view */
    .auth-page .auth-form .d-flex.gap-2 {
        margin-top: 0.5rem;
    }
    
    .auth-page .auth-form #googleLoginBtn {
        padding: 0.35rem;
        min-width: 42px;
    }
    
    /* Google icon for button */
    .auth-page .auth-form #googleLoginBtn .google-icon {
        margin: 0;
        vertical-align: middle;
    }
    
    /* Layout adjustments to center card in viewport */
    .auth-page .row.mt-5 {
        margin-top: -1rem !important;
        margin-bottom: 0 !important;
        min-height: 80vh;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobile - reduce vertical spacing between elements */
    .auth-page .col-md-7,
    .auth-page .col-md-4 {
        padding: 0.5rem;
    }
    
    /* Make the welcome message take less space and push auth card up */
    .auth-page .welcome-message {
        margin-bottom: -5rem;
        padding-bottom: 0;
    }
    
    /* Move the auth column up */
    .auth-page .col-md-4 {
        margin-top: -1rem;
        position: relative;
        z-index: 2;
    }
    
    /* Center the auth card better on mobile */
    .auth-page .auth-card {
        max-width: 90%;
        margin: 0 auto;
    }
    
    /* Footer to stick to bottom */
    .auth-page footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        padding: 0.5rem 0;
        background-color: rgba(255, 255, 255, 0.8);
    }
}