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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f7;
    min-height: 100vh;
    padding: 0;
}

.container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    background: transparent;
    min-height: 100vh;
}

header {
    background: transparent;
    padding: 40px 40px 24px 40px;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

/* Log page specific header content styling */
.log-page .header-content {
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0;
    color: #1d1d1f;
    font-weight: 600;
    text-align: center;
}

/* Log page specific header styling - Desktop: Centered */
.log-page header h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 2.75rem; /* Increased from 2.5rem */
}

/* Log page specific header padding to account for absolute positioning */
.log-page header {
    padding: 40px 40px 46px 40px;
}

/* Mobile-specific title size */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .logout-btn {
        width: auto;
        height: auto;
        padding: 8px 16px;
        min-width: 80px;
    }
}

.header-actions {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
}


.user-info {
    color: #86868b;
    font-size: 0.875rem;
    font-weight: 500;
}

.logout-btn {
    background: transparent;
    color: #1d1d1f;
    border: none;
    padding: 8px 16px;
    border-radius: 0;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.logout-icon {
    width: 18px;
    height: 18px;
    display: none;
}

.logout-text {
    display: block;
}

@media (min-width: 768px) {
    .logout-text {
        display: none;
    }

    .logout-icon {
        display: block;
    }

    .logout-btn {
        padding: 0;
    }
}

/* Hide mobile logout button on desktop */
.logout-btn-mobile {
    display: none;
}

.logout-btn:hover {
    background: transparent;
    border-color: transparent;
}

.logout-btn:active {
    background: transparent;
}

.subtitle {
    font-size: 0.9375rem;
    color: #86868b;
    font-weight: 400;
}

main {
    padding: 0 40px 40px 40px;
}

.status-box {
    background: white;
    border: 1px solid #d2d2d7;
    padding: 14px 20px;
    margin-bottom: 24px;
    border-radius: 10px;
    text-align: center;
}

.status-box.success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.status-box.error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.status-box.running {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.status-box.hidden {
    display: none;
}

.status-content {
    font-size: 0.875rem;
    font-weight: 500;
}

.input-section, .results-section {
    margin-bottom: 24px;
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

h2 {
    color: #1d1d1f;
    margin-bottom: 16px;
    font-size: 1.125rem;
    font-weight: 600;
}

.help-text {
    color: #86868b;
    font-size: 0.8125rem;
    margin-bottom: 10px;
    font-weight: 400;
}

textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #1d1d1f;
    background: #fafafa;
}

textarea:hover {
    border-color: #b0b0b5;
}

textarea:focus {
    outline: none;
    border-color: #1d1d1f;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    background: white;
}

/* Activity Log Styles */
.activity-log {
    width: 100%;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    background: #fafafa;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: #1d1d1f;
    height: 270px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.log-header {
    display: block;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e5e7;
    background: #f5f5f7;
    border-radius: 10px 10px 0 0;
}

.log-header .scrape-title-with-status,
.log-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.log-header h3 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1d1d1f;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.scrape-number {
    font-size: 0.8125rem;
    color: #86868b;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.log-entries {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px;
    line-height: 1.4;
    text-align: left;
}

.log-entry {
    margin-bottom: 4px;
    word-wrap: break-word;
    white-space: pre-wrap;
    text-align: left;
}

.log-timestamp {
    color: #86868b;
    font-weight: 500;
    margin-right: 8px;
}

.log-message {
    color: #1d1d1f;
}


.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 13px 48px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    background: white;
    color: #1d1d1f;
}

.btn:hover:not(:disabled) {
    background: #fafafa;
    border-color: #1d1d1f;
}

.btn:active:not(:disabled) {
    background: #f0f0f0;
}


/* Checkmark icon for copy buttons */
.checkmark-icon {
    width: 16px;
    height: 16px;
    color: #86868b;
}

.btn-primary {
    background: white;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
}

.btn-primary:hover:not(:disabled) {
    background: #fafafa;
    border-color: #1d1d1f;
}

.btn-primary:disabled {
    background: #fafafa;
    color: #b0b0b5;
    border-color: #e5e5e7;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
}

.btn-secondary:hover:not(:disabled) {
    background: #fafafa;
    border-color: #1d1d1f;
}

.hidden {
    display: none !important;
}

/* Stop Button Styling - Match START button exactly */
#stopBtn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 48px;
    order: 0; /* Position STOP in same place as START (left side) */
}

#stopBtn .btn-text {
    color: #1d1d1f !important;
    font-weight: 600; /* Desktop weight */
}

#stopBtn .stop-icon {
    width: 16px;
    height: 16px;
    fill: #1d1d1f;
}

/* START button positioning */
#startBtn {
    order: 0; /* Keep START on the left */
}

/* LOG button positioning */
#logBtn {
    order: 1; /* Move LOG to the right */
}

/* Back Arrow Button Styling */
#backBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
}

/* Back button in header - positioned in top-left */
.back-btn-header {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    z-index: 10;
    background: #f5f5f7;
}

.back-btn-header:hover {
    background: #e5e5e7;
    transform: translateY(-50%) translateX(-2px);
}

#backBtn .back-arrow-icon {
    width: 12px;
    height: 12px;
    stroke: #1d1d1f;
    fill: none;
    stroke-width: 2;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    align-items: center;
    margin-left: 12px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #d2d2d7;
    border-top: 2px solid #1d1d1f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button spinner styles */
.btn-spinner {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

.spinner-icon {
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

.spinner-circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-dasharray: 50;
    stroke-dashoffset: 0;
    animation: spinner-dash 1.5s ease-in-out infinite;
}

@keyframes spinner-dash {
    0% {
        stroke-dashoffset: 50;
    }
    50% {
        stroke-dashoffset: 12.5;
    }
    100% {
        stroke-dashoffset: 50;
    }
}

/* Hide status box */
#statusBox {
    display: none !important;
}

/* Delete button styles */
.btn-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    color: #1d1d1f;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.btn-delete:hover {
    color: #ff3b30;
    transform: scale(1.1);
}

/* Mobile delete button in top-left corner */
@media (max-width: 768px) {
    .btn-delete {
        top: 8px;
        left: 8px;
        right: auto;
        width: 22px;
        height: 22px;
        font-size: 14px;
        background: transparent;
        border: none;
        border-radius: 0;
    }
    
    .btn-delete:hover {
        background: transparent;
        border: none;
    }
    
    /* Mobile modal optimization */
    .modal-content {
        width: 90%;
        max-width: 340px;
        padding: 24px 20px;
    }
    
    .modal-content h3 {
        font-size: 1.25rem;
    }
    
    .modal-content p {
        font-size: 0.875rem;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .modal-buttons button {
        width: 100%;
    }
}


/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin: 0 0 12px 0;
    color: #1d1d1f;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

.modal-content p {
    margin: 0 0 20px 0;
    color: #86868b;
    font-size: 0.9375rem;
    line-height: 1.4;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-secondary {
    background: white;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
}

.btn-secondary:hover {
    background: #e5e5e7;
}

.btn-danger {
    background: #1d1d1f;
    color: white;
    border: 1px solid #1d1d1f;
}

.btn-danger:hover {
    background: white;
    color: black;
    border-color: #1d1d1f;
}

.results-container {
    display: grid;
    gap: 16px;
    width: 100%; /* Constrain container */
    max-width: 100%; /* Prevent overflow */
    box-sizing: border-box;
}

.result-card {
    position: relative;
    background: #fafafa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e5e7;
    transition: all 0.2s;
    box-sizing: border-box; /* Ensure padding is included in width */
    width: 100%; /* Explicit width */
    max-width: 100%; /* Prevent overflow */
}

.result-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #d2d2d7;
    transform: translateY(-1px);
}

.result-card.in-progress {
    border: 2px solid #ffcc00;
    background: #fffbf0;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    overflow: hidden; /* Prevent content from extending beyond card */
    width: 100%;
    box-sizing: border-box;
}

.result-filename {
    font-weight: 600;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9375rem;
}

.status-badge {
    background: #ffcc00;
    color: #1d1d1f;
    font-size: 0.625rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.in-progress-text {
    color: #86868b;
    font-weight: 400;
    font-style: italic;
    font-size: 0.8125rem;
}

.result-date {
    color: #86868b;
    font-size: 0.8125rem;
    font-weight: 400;
}

.result-stats {
    display: flex;
    gap: 20px;
    color: #86868b;
    font-size: 0.8125rem;
    font-weight: 400;
}

.button-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Mobile: Button ordering - vertical stack */
@media (max-width: 768px) {
    #startBtn {
        order: 0;
    }
    
    #stopBtn {
        order: 0;
    }
    
    #logBtn {
        order: 1;
    }
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: white;
    color: #1d1d1f;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    border: 1px solid #d2d2d7;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
}

.btn-download:hover {
    background: #f5f5f7;
    border-color: #1d1d1f;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: white;
    color: #1d1d1f;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    border: 1px solid #d2d2d7;
    cursor: pointer;
    font-family: inherit;
    font-size: 18px;
    font-weight: bold;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
}

.btn-copy:hover {
    background: #f5f5f7;
    border-color: #1d1d1f;
}

.btn-copy-ids {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: white;
    color: #1d1d1f;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    border: 1px solid #d2d2d7;
    cursor: pointer;
    font-family: inherit;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
}

.btn-copy-ids:hover {
    background: #f5f5f7;
    border-color: #1d1d1f;
}

.download-icon, .copy-icon, .checkmark-icon {
    width: 18px;
    height: 18px;
}

.loading {
    text-align: center;
    color: #86868b;
    padding: 40px 20px;
    font-size: 0.9375rem;
}

footer {
    background: white;
    padding: 20px;
    text-align: center;
    color: #86868b;
    border-top: 1px solid #e5e5e7;
    font-size: 0.8125rem;
}

@media (max-width: 768px) {
    body {
        padding: 20px 16px;
    }

    .container {
        margin-top: 20px;
    }

    header {
        padding: 32px 24px 16px 24px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    main {
        padding: 24px;
    }

    .button-group {
        flex-direction: row !important;
        gap: 12px !important;
        justify-content: space-between !important;
    }

    /* Main action buttons on mobile - side by side */
    .input-section > .button-group {
        display: flex !important;
        flex-direction: row !important;
        gap: 12px !important;
    }

    /* Make START button align left, LOG button align right */
    .btn:not(.hidden),
    .btn-primary:not(.hidden),
    #startBtn:not(.hidden),
    #stopBtn:not(.hidden),
    #logBtn:not(.hidden) {
        flex: 1 !important;
        min-width: 0 !important;
        width: auto !important;
        max-width: 50% !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 14px 16px !important;
        font-weight: 700 !important;
        font-size: 1rem !important;
        text-align: center !important;
        margin: 0 !important;
    }
    
    /* START button - center text properly on mobile */
    #startBtn {
        gap: 0 !important;
        overflow: hidden;
        justify-content: center !important;
    }
    
    /* Hide spinner completely on mobile so text is centered */
    #startBtn .btn-spinner {
        display: none !important;
    }
    
    #startBtn .btn-text,
    #stopBtn .btn-text,
    #logBtn .btn-text {
        flex-shrink: 0;
        white-space: nowrap;
        font-weight: 700 !important;
    }
    
    /* STOP button icon on mobile */
    #stopBtn .stop-icon {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .result-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
    }

    .result-filename {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .result-stats {
        display: none;
    }

    .result-filename::after {
        content: attr(data-users);
        font-size: 0.8125rem;
        color: #86868b;
        font-weight: 400;
    }

    /* Recent section action buttons - keep horizontal */
    .result-header .button-group {
        flex-direction: row !important;
        gap: 8px !important;
        align-items: flex-start !important;
        flex-shrink: 0 !important;
    }

    .btn-download, .btn-copy, .btn-copy-ids {
        padding: 6px;
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        flex-shrink: 0 !important;
    }

    /* Ensure all icons are the same size on mobile */
    .download-icon, .copy-icon, .checkmark-icon {
        width: 16px;
        height: 16px;
    }

    /* Make @ icon same size as other icons on mobile */
    .btn-copy {
        font-size: 16px;
        line-height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .input-section, .results-section {
        padding: 20px;
        margin-bottom: 16px;
        width: 100%;
        max-width: none;
    }

    .result-card {
        padding: 16px;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0; /* Allow shrinking if needed */
        box-sizing: border-box !important;
    }

    .result-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .result-filename {
        flex: 1;
        min-width: 0;
    }

    .button-group {
        flex-shrink: 0;
        flex-direction: row;
        gap: 8px;
    }
}

/* See More Button Styles */
.see-more-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e7;
}

.btn-see-more {
    background: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-see-more:hover {
    background: #e8e8ed;
    border-color: #1d1d1f;
}

.btn-see-more:active {
    background: #d2d2d7;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f5f5f7;
    padding: 20px;
}

.login-box {
    background: white;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 2rem;
    color: #1d1d1f;
    margin-bottom: 8px;
    font-weight: 600;
}

.login-header p {
    color: #86868b;
    font-size: 0.9375rem;
}

.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.875rem;
    font-weight: 500;
}

.flash-error {
    background: #ffe5e5;
    color: #d70015;
    border: 1px solid #ffb3b3;
}

.flash-info {
    background: #e5f3ff;
    color: #0071e3;
    border: 1px solid #b3d9ff;
}

.flash-success {
    background: #e5f7e5;
    color: #00a651;
    border: 1px solid #b3e5b3;
}

.login-form {
    margin-bottom: 20px;
}

.signin-title {
    text-align: center;
    margin-bottom: 20px;
}

.signin-title h2 {
    color: #1d1d1f;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #1d1d1f;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.login-btn {
    width: 100%;
    background: #1d1d1f;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

.login-btn:hover {
    background: #2d2d2f;
}

.login-btn:active {
    background: #0d0d0f;
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e5e7;
}

.login-footer p {
    color: #86868b;
    font-size: 0.8125rem;
}

/* Mobile responsive for login */
@media (max-width: 768px) {
    .login-container {
        padding: 10px 10px 20px 10px; /* Reduced top padding from 20px to 10px (50% reduction) */
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 1.75rem;
    }
}

/* Mobile responsive for header */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        position: relative;
    }
    
    header h1 {
        font-size: 2rem;
        text-align: center;
    }
    
    .header-actions {
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 10px;
    }
    
    
    .logout-btn {
        padding: 6px 12px;
        font-size: 0.8125rem;
    }
    
    /* Hide desktop logout button on mobile */
    .header-actions {
        display: none;
    }
    
    /* Show mobile logout button in footer */
    .logout-btn-mobile {
        display: inline-block;
        margin-bottom: 20px;
    }
    
    /* Style footer for mobile */
    footer {
        text-align: center;
        padding: 20px;
    }
    
    /* Hide Copy IDs button on mobile */
    .btn-copy-ids {
        display: none !important;
    }
}

/* Status indicators for scrape titles */
.scrape-title-with-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-completed {
    background-color: #34c759;
    color: white;
}

.status-stopped {
    background-color: #ff3b30;
    color: white;
}

.status-icon {
    width: 12px;
    height: 12px;
    stroke-width: 2.5;
}

/* Recent section header with search bar */
.recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-input {
    width: 150px;
    padding: 8px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    font-size: 0.9375rem;
    color: #1d1d1f;
    background-color: #f5f5f7;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #1d1d1f;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    background-color: white;
}

.search-input::placeholder {
    color: #86868b;
}

/* Mobile responsive for search bar */
@media (max-width: 768px) {
    .recent-header {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .search-input {
        width: 120px;
        flex-shrink: 0;
    }
}

/* Mobile-only changes for log page */
@media (max-width: 768px) {
    /* Log page header: Move back button to left of "Activity Log" text */
    .log-page header {
        background: white;
        border-radius: 12px;
        padding: 24px;
        margin-bottom: 24px;
    }
    
    .log-page .header-content {
        justify-content: flex-start;
        align-items: center;
        gap: 12px; /* Reduced gap for tighter spacing */
        position: relative;
    }
    
    .log-page header h1 {
        position: static;
        transform: none;
        margin: 0;
        margin-left: 12px; /* Shift right to align 'A' over checkmark */
        font-size: 2.25rem; /* Larger for better visibility */
    }
    
    .log-page .back-btn-header {
        position: static;
        transform: none;
        margin: 0;
        margin-right: 4px; /* Add extra margin for more spacing */
    }
    
    .log-page .header-actions {
        position: static;
        transform: none;
    }
    
    /* Log page: Make STOP button not full width (match main page style) */
    .log-page .button-group {
        flex-direction: row;
        gap: 8px;
    }
    
    .log-page .button-group .btn {
        width: auto;
        flex: 0 0 auto;
    }
    
    .log-page #stopBtn {
        width: auto;
        padding: 13px 48px;
    }
}
